From 49580a7630fd7bd66a1d9127ff193d7435dd6ebe Mon Sep 17 00:00:00 2001 From: Jobobby04 Date: Mon, 4 May 2020 13:58:08 -0400 Subject: [PATCH] Fixed All Sources in Filter list --- .../tachiyomi/ui/setting/SettingsSourcesController.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt index 4ebfcd593..0c59fd15f 100755 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt @@ -50,6 +50,7 @@ class SettingsSourcesController : SettingsController() { sorting = SourcesSort.from(preferences.sourceSorting().get()) ?: SourcesSort.Alpha activity?.invalidateOptionsMenu() + // Get the list of active language codes. val activeLangsCodes = preferences.enabledLanguages().get() @@ -115,11 +116,11 @@ class SettingsSourcesController : SettingsController() { onChange { newValue -> val checked = newValue as Boolean - val current = preferences.hiddenCatalogues().get() ?: mutableSetOf() + val current = preferences.hiddenCatalogues().get() as MutableSet? ?: mutableSetOf() if (checked) { - current.minus(sources.map { it.id.toString() }) + current.removeAll(sources.map { it.id.toString() }) } else { - current.plus(sources.map { it.id.toString() }) + current.addAll(sources.map { it.id.toString() }) } preferences.hiddenCatalogues().set(current) group.removeAll()