Browse Source

Minor extension filter cleanup

arkon 5 năm trước cách đây
mục cha
commit
e414b9edf1

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt

@@ -81,7 +81,7 @@ open class ExtensionController : NucleusController<ExtensionPresenter>(),
     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()))
             }

+ 5 - 5
app/src/main/java/eu/kanade/tachiyomi/ui/extension/SettingsExtensionsController.kt → 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() {
             }
         }
     }
-}
+}

+ 6 - 6
app/src/main/res/menu/extension_main.xml

@@ -3,15 +3,15 @@
 
     <item
         android:id="@+id/action_search"
-        android:title="@string/action_search"
         android:icon="@drawable/ic_search_white_24dp"
-        app:showAsAction="collapseActionView|ifRoom"
-        app:actionViewClass="androidx.appcompat.widget.SearchView"/>
+        android:title="@string/action_search"
+        app:actionViewClass="androidx.appcompat.widget.SearchView"
+        app:showAsAction="collapseActionView|ifRoom" />
 
     <item
         android:id="@+id/action_settings"
-        android:title="@string/ext_settings"
-        android:icon="@drawable/ic_settings_white_24dp"
-        app:showAsAction="always"/>
+        android:icon="@drawable/ic_filter_list_white_24dp"
+        android:title="@string/action_filter"
+        app:showAsAction="ifRoom" />
 
 </menu>

+ 0 - 1
app/src/main/res/values/strings.xml

@@ -176,7 +176,6 @@
     <string name="ext_version_info">Version: %1$s</string>
     <string name="ext_language_info">Language: %1$s</string>
     <string name="ext_empty_preferences">No preferences to edit for this extension</string>
-    <string name="ext_settings">Settings</string>
 
       <!-- Reader section -->
     <string name="pref_fullscreen">Fullscreen</string>