resolve compiler warnings
This commit is contained in:
@@ -32,7 +32,6 @@ object Category {
|
||||
if (name.equals(DEFAULT_CATEGORY_NAME, ignoreCase = true)) return
|
||||
|
||||
transaction {
|
||||
val count = CategoryTable.selectAll().count()
|
||||
if (CategoryTable.select { CategoryTable.name eq name }.firstOrNull() == null) {
|
||||
CategoryTable.insert {
|
||||
it[CategoryTable.name] = name
|
||||
|
||||
@@ -41,7 +41,7 @@ object MangaList {
|
||||
val mangasPage = this
|
||||
val mangaList = transaction {
|
||||
return@transaction mangasPage.mangas.map { manga ->
|
||||
val mangaEntry = MangaTable.select { MangaTable.url eq manga.url }.firstOrNull()
|
||||
var mangaEntry = MangaTable.select { MangaTable.url eq manga.url }.firstOrNull()
|
||||
if (mangaEntry == null) { // create manga entry
|
||||
val mangaId = MangaTable.insertAndGetId {
|
||||
it[url] = manga.url
|
||||
@@ -57,7 +57,7 @@ object MangaList {
|
||||
it[sourceReference] = sourceId
|
||||
}.value
|
||||
|
||||
val mangaEntry = MangaTable.select { MangaTable.url eq manga.url }.first()
|
||||
mangaEntry = MangaTable.select { MangaTable.url eq manga.url }.first()
|
||||
|
||||
MangaDataClass(
|
||||
mangaId,
|
||||
|
||||
@@ -114,6 +114,7 @@ object ProtoBackupImport : ProtoBackupBase() {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER") // TODO: remove
|
||||
private fun restoreMangaData(
|
||||
manga: Manga,
|
||||
chapters: List<Chapter>,
|
||||
|
||||
Reference in New Issue
Block a user