浏览代码

Show extension icons in source filtering view (closes #2814)

arkon 5 年之前
父节点
当前提交
9da27cc56e
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt

+ 6 - 0
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()