Fix download ahead while reading functionality (#9640)

Correct condition for downloading next chapter

(cherry picked from commit ee684cbef52a0f9ec9873d9e9d854d95bad5df66)
This commit is contained in:
Denny Rodrigues do Carmo 2023-06-25 15:18:54 -03:00 committed by Jobobby04
parent d4a2992ac1
commit 65676730fc

View File

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