From 39c6bcccd8e4e687c0864b212437a387e69cf2f3 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 5 Aug 2023 12:01:17 -0400 Subject: [PATCH] Consider local manga as downloaded when filtering in reader Fixes #9801 --- .../kanade/tachiyomi/util/chapter/ChapterFilterDownloaded.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterFilterDownloaded.kt b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterFilterDownloaded.kt index e8731d838d..0f489f2f5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterFilterDownloaded.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterFilterDownloaded.kt @@ -3,13 +3,16 @@ package eu.kanade.tachiyomi.util.chapter import eu.kanade.tachiyomi.data.download.DownloadCache import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.model.Manga +import tachiyomi.source.local.isLocal import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get /** - * Returns a copy of the list with not downloaded chapters removed + * Returns a copy of the list with not downloaded chapters removed. */ fun List.filterDownloaded(manga: Manga): List { + if (manga.isLocal()) return this + val downloadCache: DownloadCache = Injekt.get() return filter { downloadCache.isChapterDownloaded(it.name, it.scanlator, manga.title, manga.source, false) }