mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-03 10:31:51 +01:00
Show extension icons in source filtering view (closes #2814)
This commit is contained in:
parent
92c5497eab
commit
9da27cc56e
@ -7,6 +7,7 @@ import androidx.preference.PreferenceScreen
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
import eu.kanade.tachiyomi.source.SourceManager
|
import eu.kanade.tachiyomi.source.SourceManager
|
||||||
|
import eu.kanade.tachiyomi.source.icon
|
||||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.util.preference.onChange
|
import eu.kanade.tachiyomi.util.preference.onChange
|
||||||
import eu.kanade.tachiyomi.util.preference.switchPreferenceCategory
|
import eu.kanade.tachiyomi.util.preference.switchPreferenceCategory
|
||||||
@ -82,6 +83,11 @@ class SettingsSourcesController : SettingsController() {
|
|||||||
isPersistent = false
|
isPersistent = false
|
||||||
isChecked = id !in hiddenCatalogues
|
isChecked = id !in hiddenCatalogues
|
||||||
|
|
||||||
|
val sourceIcon = source.icon()
|
||||||
|
if (sourceIcon != null) {
|
||||||
|
icon = sourceIcon
|
||||||
|
}
|
||||||
|
|
||||||
onChange { newValue ->
|
onChange { newValue ->
|
||||||
val checked = newValue as Boolean
|
val checked = newValue as Boolean
|
||||||
val current = preferences.hiddenCatalogues().getOrDefault()
|
val current = preferences.hiddenCatalogues().getOrDefault()
|
||||||
|
Loading…
Reference in New Issue
Block a user