Browse Source

Fix download ahead while reading functionality (#9640)

Correct condition for downloading next chapter
Denny Rodrigues do Carmo 1 year ago
parent
commit
ee684cbef5

+ 1 - 2
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt

@@ -473,8 +473,7 @@ class ReaderViewModel(
                 manga.title,
                 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()!!)