From e414b9edf18bc16d63beaed6dc483c07cb44d166 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 11 Jan 2020 15:13:51 -0500 Subject: [PATCH] Minor extension filter cleanup --- .../tachiyomi/ui/extension/ExtensionController.kt | 2 +- ...onsController.kt => ExtensionFilterController.kt} | 10 +++++----- app/src/main/res/menu/extension_main.xml | 12 ++++++------ app/src/main/res/values/strings.xml | 1 - 4 files changed, 12 insertions(+), 13 deletions(-) rename app/src/main/java/eu/kanade/tachiyomi/ui/extension/{SettingsExtensionsController.kt => ExtensionFilterController.kt} (89%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt index 33a9085ab5..ff83e48efa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt @@ -81,7 +81,7 @@ open class ExtensionController : NucleusController(), override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.action_settings -> { - router.pushController((RouterTransaction.with(SettingsExtensionsController())) + router.pushController((RouterTransaction.with(ExtensionFilterController())) .popChangeHandler(SettingsExtensionsFadeChangeHandler()) .pushChangeHandler(FadeChangeHandler())) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionFilterController.kt similarity index 89% rename from app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt rename to app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionFilterController.kt index df9817dc06..7c2be136f3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionFilterController.kt @@ -1,7 +1,7 @@ package eu.kanade.tachiyomi.ui.extension -import android.support.v7.preference.PreferenceScreen -import android.support.v7.preference.SwitchPreference +import androidx.preference.PreferenceScreen +import androidx.preference.SwitchPreference import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.extension.ExtensionManager @@ -12,10 +12,10 @@ import eu.kanade.tachiyomi.util.LocaleHelper import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -class SettingsExtensionsController: SettingsController() { +class ExtensionFilterController: SettingsController() { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { - titleRes = R.string.ext_settings + titleRes = R.string.action_filter val activeLangs = preferences.enabledLanguages().getOrDefault() @@ -49,4 +49,4 @@ class SettingsExtensionsController: SettingsController() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/res/menu/extension_main.xml b/app/src/main/res/menu/extension_main.xml index 2d88c505fc..520be80b3a 100644 --- a/app/src/main/res/menu/extension_main.xml +++ b/app/src/main/res/menu/extension_main.xml @@ -3,15 +3,15 @@ + android:title="@string/action_search" + app:actionViewClass="androidx.appcompat.widget.SearchView" + app:showAsAction="collapseActionView|ifRoom" /> + android:icon="@drawable/ic_filter_list_white_24dp" + android:title="@string/action_filter" + app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9065a407dd..7318d62f8e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -176,7 +176,6 @@ Version: %1$s Language: %1$s No preferences to edit for this extension - Settings Fullscreen