fix deletion of duplicate downloaded chapters when automatically marked as read (#1500)

This commit is contained in:
NGB-Was-Taken
2025-12-12 00:41:57 +05:45
committed by GitHub
parent 6fb6838656
commit 5566db160b
@@ -767,14 +767,17 @@ class ReaderViewModel @JvmOverloads constructor(
chapter.chapterNumber.toFloat() == readerChapter.chapter.chapter_number
) {
ChapterUpdate(id = chapter.id, read = true)
// SY -->
.also { deleteChapterIfNeeded(ReaderChapter(chapter)) }
// SY <--
} else {
null
}
}
updateChapter.awaitAll(duplicateUnreadChapters)
// SY -->
duplicateUnreadChapters.forEach { chapterUpdate ->
val chapter = unfilteredChapterList.first { it.id == chapterUpdate.id }
deleteChapterIfNeeded(ReaderChapter(chapter))
}
// SY <--
}
fun restartReadTimer() {