Fixed All Sources in Filter list
This commit is contained in:
parent
0300c1057b
commit
49580a7630
@ -50,6 +50,7 @@ class SettingsSourcesController : SettingsController() {
|
|||||||
|
|
||||||
sorting = SourcesSort.from(preferences.sourceSorting().get()) ?: SourcesSort.Alpha
|
sorting = SourcesSort.from(preferences.sourceSorting().get()) ?: SourcesSort.Alpha
|
||||||
activity?.invalidateOptionsMenu()
|
activity?.invalidateOptionsMenu()
|
||||||
|
|
||||||
// Get the list of active language codes.
|
// Get the list of active language codes.
|
||||||
val activeLangsCodes = preferences.enabledLanguages().get()
|
val activeLangsCodes = preferences.enabledLanguages().get()
|
||||||
|
|
||||||
@ -115,11 +116,11 @@ class SettingsSourcesController : SettingsController() {
|
|||||||
|
|
||||||
onChange { newValue ->
|
onChange { newValue ->
|
||||||
val checked = newValue as Boolean
|
val checked = newValue as Boolean
|
||||||
val current = preferences.hiddenCatalogues().get() ?: mutableSetOf()
|
val current = preferences.hiddenCatalogues().get() as MutableSet? ?: mutableSetOf()
|
||||||
if (checked) {
|
if (checked) {
|
||||||
current.minus(sources.map { it.id.toString() })
|
current.removeAll(sources.map { it.id.toString() })
|
||||||
} else {
|
} else {
|
||||||
current.plus(sources.map { it.id.toString() })
|
current.addAll(sources.map { it.id.toString() })
|
||||||
}
|
}
|
||||||
preferences.hiddenCatalogues().set(current)
|
preferences.hiddenCatalogues().set(current)
|
||||||
group.removeAll()
|
group.removeAll()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user