diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt index 9c01afa1b..8cfe8ad9b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt @@ -345,12 +345,10 @@ class DownloadManager( private fun getChaptersToDelete(chapters: List, manga: Manga): List { // Retrieve the categories that are set to exclude from being deleted on read val categoriesToExclude = preferences.removeExcludeCategories().get().map(String::toInt) - val categoriesForManga = - manga.let { it -> - db.getCategoriesForManga(it).executeAsBlocking() - .mapNotNull { it.id } - .takeUnless { it.isEmpty() } - } ?: listOf(0) + val categoriesForManga = db.getCategoriesForManga(manga).executeAsBlocking() + .mapNotNull { it.id } + .takeUnless { it.isEmpty() } + ?: listOf(0) return if (categoriesForManga.intersect(categoriesToExclude).isNotEmpty()) { chapters.filterNot { it.read } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 59b574167..65923b90e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -382,7 +382,7 @@ After marked as read Automatically after reading Allow deleting bookmarked chapters - Categories to exclude in deleting + Excluded categories Custom location Disabled Last read chapter