This commit is contained in:
Aria Moradi 2021-05-11 18:55:09 +04:30
parent c200785479
commit 320d7e2536

View File

@ -73,8 +73,10 @@ object Chapter {
val dbChapterList = transaction { ChapterTable.selectAll() } val dbChapterList = transaction { ChapterTable.selectAll() }
dbChapterList.forEach { dbChapterList.forEach {
(it[ChapterTable.chapterIndex] >= chapterList.size (
|| chapterList[it[ChapterTable.chapterIndex]].url != it[ChapterTable.url]) it[ChapterTable.chapterIndex] >= chapterList.size ||
chapterList[it[ChapterTable.chapterIndex]].url != it[ChapterTable.url]
)
ChapterTable.deleteWhere { ChapterTable.id eq it[ChapterTable.id] } ChapterTable.deleteWhere { ChapterTable.id eq it[ChapterTable.id] }
} }