From 9da27cc56ecf53bb054e05e13b7331c0b0f8cac1 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 2 Apr 2020 19:52:09 -0400 Subject: [PATCH] Show extension icons in source filtering view (closes #2814) --- .../tachiyomi/ui/setting/SettingsSourcesController.kt | 6 ++++++ 1 file changed, 6 insertions(+) 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 0a7619cda3..3a456522a9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt @@ -7,6 +7,7 @@ import androidx.preference.PreferenceScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.source.SourceManager +import eu.kanade.tachiyomi.source.icon import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.preference.onChange import eu.kanade.tachiyomi.util.preference.switchPreferenceCategory @@ -82,6 +83,11 @@ class SettingsSourcesController : SettingsController() { isPersistent = false isChecked = id !in hiddenCatalogues + val sourceIcon = source.icon() + if (sourceIcon != null) { + icon = sourceIcon + } + onChange { newValue -> val checked = newValue as Boolean val current = preferences.hiddenCatalogues().getOrDefault()