Преглед на файлове

Consider local manga as downloaded when filtering in reader

Fixes #9801
arkon преди 1 година
родител
ревизия
39c6bcccd8
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterFilterDownloaded.kt

+ 4 - 1
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 eu.kanade.tachiyomi.data.download.DownloadCache
 import tachiyomi.domain.chapter.model.Chapter
 import tachiyomi.domain.chapter.model.Chapter
 import tachiyomi.domain.manga.model.Manga
 import tachiyomi.domain.manga.model.Manga
+import tachiyomi.source.local.isLocal
 import uy.kohesive.injekt.Injekt
 import uy.kohesive.injekt.Injekt
 import uy.kohesive.injekt.api.get
 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<Chapter>.filterDownloaded(manga: Manga): List<Chapter> {
 fun List<Chapter>.filterDownloaded(manga: Manga): List<Chapter> {
+    if (manga.isLocal()) return this
+
     val downloadCache: DownloadCache = Injekt.get()
     val downloadCache: DownloadCache = Injekt.get()
 
 
     return filter { downloadCache.isChapterDownloaded(it.name, it.scanlator, manga.title, manga.source, false) }
     return filter { downloadCache.isChapterDownloaded(it.name, it.scanlator, manga.title, manga.source, false) }