From 0b73f8b1ef1950d5d1b55f2ae510d4519636f12d Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 6 Jun 2020 10:17:18 -0400 Subject: [PATCH] Update source/extension filter controller titles --- .../ui/browse/extension/ExtensionFilterController.kt | 2 +- .../kanade/tachiyomi/ui/browse/source/SourceController.kt | 4 ++-- .../source/SourceFilterController.kt} | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) rename app/src/main/java/eu/kanade/tachiyomi/ui/{setting/SettingsSourcesController.kt => browse/source/SourceFilterController.kt} (90%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterController.kt index b21940704..31f72bc72 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionFilterController.kt @@ -14,7 +14,7 @@ import uy.kohesive.injekt.api.get class ExtensionFilterController : SettingsController() { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.action_filter + titleRes = R.string.label_extensions val activeLangs = preferences.enabledLanguages().get() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt index 6e9a4e22d..6aac19de4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt @@ -28,7 +28,6 @@ import eu.kanade.tachiyomi.ui.browse.BrowseController import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchController import eu.kanade.tachiyomi.ui.browse.source.latest.LatestUpdatesController -import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController import kotlinx.coroutines.flow.filterIsInstance import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -235,7 +234,8 @@ class SourceController : // Initialize option to open catalogue settings. R.id.action_settings -> { parentController!!.router.pushController( - SettingsSourcesController().withFadeTransaction() + SourceFilterController() + .withFadeTransaction() ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt similarity index 90% rename from app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt rename to app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt index 99f5dfd6c..f7cffc56a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt @@ -1,9 +1,10 @@ -package eu.kanade.tachiyomi.ui.setting +package eu.kanade.tachiyomi.ui.browse.source import android.graphics.drawable.Drawable import androidx.preference.PreferenceScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.SourceManager +import eu.kanade.tachiyomi.ui.setting.SettingsController import eu.kanade.tachiyomi.util.preference.onChange import eu.kanade.tachiyomi.util.preference.switchPreference import eu.kanade.tachiyomi.util.preference.titleRes @@ -12,12 +13,12 @@ import java.util.TreeMap import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -class SettingsSourcesController : SettingsController() { +class SourceFilterController : SettingsController() { private val onlineSources by lazy { Injekt.get().getOnlineSources() } override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.action_filter + titleRes = R.string.label_sources // Get the list of active language codes. val activeLangsCodes = preferences.enabledLanguages().get()