Fix auto downloader for "Default" category (#7476)

(cherry picked from commit 038532897bea53d2cd248baf91e9c365acc3e491)
This commit is contained in:
AntsyLich 2022-07-07 18:01:15 +06:00 committed by Jobobby04
parent f1729a1a26
commit 4f136ca63b

View File

@ -50,9 +50,11 @@ fun Manga.removeCovers(coverCache: CoverCache = Injekt.get()): Int {
return coverCache.deleteFromCache(this, true)
}
fun DomainManga.shouldDownloadNewChapters(categories: List<Long>, prefs: PreferencesHelper): Boolean {
fun DomainManga.shouldDownloadNewChapters(dbCategories: List<Long>, 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