fix deletion of duplicate downloaded chapters when automatically marked as read (#1500)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user