浏览代码

Fix category exclude not working in DownloadManager (#7641)

Andreas 2 年之前
父节点
当前提交
56028aff55
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt

+ 2 - 2
app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt

@@ -361,9 +361,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)