Fix category exclude not working in DownloadManager (#7641)

(cherry picked from commit 56028aff5546222da2f03af2f84d8660917b828e)
This commit is contained in:
Andreas 2022-07-29 13:46:09 +02:00 committed by Jobobby04
parent f15f14259e
commit b592709630

View File

@ -415,9 +415,9 @@ class DownloadManager(
private fun getChaptersToDelete(chapters: List<Chapter>, manga: Manga): List<Chapter> {
// Retrieve the categories that are set to exclude from being deleted on read
val categoriesToExclude = preferences.removeExcludeCategories().get().map(String::toInt)
val categoriesToExclude = preferences.removeExcludeCategories().get().map(String::toLong)
val categoriesForManga = runBlocking { getCategories.await(manga.id!!) }
val categoriesForManga = runBlocking { getCategories.await(manga.id) }
.map { it.id }
.takeUnless { it.isEmpty() }
?: listOf(0)