From 5854ad97e0dbada0b75feda268bf4d57a7161d01 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 7 Jan 2024 17:30:53 -0500 Subject: [PATCH] Do proper check for next chapter's download status when downloading ahead Fixes #10151 (I think?) --- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 789d26e3e6..b7f4c9c144 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 @@ -462,7 +462,8 @@ class ReaderViewModel @JvmOverloads constructor( 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()!!)