From ee684cbef52a0f9ec9873d9e9d854d95bad5df66 Mon Sep 17 00:00:00 2001 From: Denny Rodrigues do Carmo <83475695+DennyRodrigues@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:18:54 -0300 Subject: [PATCH] Fix download ahead while reading functionality (#9640) Correct condition for downloading next chapter --- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt index 1aa706811..ec37fd945 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt +++ b/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()!!)