Do proper check for next chapter's download status when downloading ahead

Fixes #10151 (I think?)

(cherry picked from commit 5854ad97e0dbada0b75feda268bf4d57a7161d01)
This commit is contained in:
arkon 2024-01-07 17:30:53 -05:00 committed by Jobobby04
parent a2e121aba1
commit a8eeb0715c

View File

@ -615,7 +615,8 @@ class ReaderViewModel @JvmOverloads constructor(
// SY <-- // SY <--
manga.source, manga.source,
) )
if (isNextChapterDownloaded) return@launchIO if (!isNextChapterDownloaded) return@launchIO
val chaptersToDownload = getNextChapters.await(manga.id, nextChapter.id!!).run { val chaptersToDownload = getNextChapters.await(manga.id, nextChapter.id!!).run {
if (readerPreferences.skipDupe().get()) { if (readerPreferences.skipDupe().get()) {
removeDuplicates(nextChapter.toDomainChapter()!!) removeDuplicates(nextChapter.toDomainChapter()!!)