From 038532897bea53d2cd248baf91e9c365acc3e491 Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:01:15 +0600 Subject: [PATCH] Fix auto downloader for "Default" category (#7476) --- app/src/main/java/eu/kanade/tachiyomi/util/MangaExtensions.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/MangaExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/MangaExtensions.kt index 3ea103f20..fb08a6e8c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/MangaExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/MangaExtensions.kt @@ -50,9 +50,11 @@ fun Manga.removeCovers(coverCache: CoverCache = Injekt.get()): Int { return coverCache.deleteFromCache(this, true) } -fun DomainManga.shouldDownloadNewChapters(categories: List, prefs: PreferencesHelper): Boolean { +fun DomainManga.shouldDownloadNewChapters(dbCategories: List, prefs: PreferencesHelper): Boolean { if (!favorite) return false + val categories = dbCategories.ifEmpty { listOf(0) } + // Boolean to determine if user wants to automatically download new chapters. val downloadNewChapter = prefs.downloadNewChapter().get() if (!downloadNewChapter) return false