More settings organization

This commit is contained in:
arkon 2020-04-29 17:34:44 -04:00
parent 970f1466b5
commit 6f0e1965b6
2 changed files with 24 additions and 14 deletions

View File

@ -6,6 +6,7 @@ import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
import eu.kanade.tachiyomi.extension.ExtensionUpdateJob import eu.kanade.tachiyomi.extension.ExtensionUpdateJob
import eu.kanade.tachiyomi.util.preference.defaultValue import eu.kanade.tachiyomi.util.preference.defaultValue
import eu.kanade.tachiyomi.util.preference.onChange import eu.kanade.tachiyomi.util.preference.onChange
import eu.kanade.tachiyomi.util.preference.preferenceCategory
import eu.kanade.tachiyomi.util.preference.switchPreference import eu.kanade.tachiyomi.util.preference.switchPreference
import eu.kanade.tachiyomi.util.preference.titleRes import eu.kanade.tachiyomi.util.preference.titleRes
@ -14,6 +15,9 @@ class SettingsBrowseController : SettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.browse titleRes = R.string.browse
preferenceCategory {
titleRes = R.string.label_extensions
switchPreference { switchPreference {
key = Keys.automaticExtUpdates key = Keys.automaticExtUpdates
titleRes = R.string.pref_enable_automatic_extension_updates titleRes = R.string.pref_enable_automatic_extension_updates
@ -25,6 +29,11 @@ class SettingsBrowseController : SettingsController() {
true true
} }
} }
}
preferenceCategory {
titleRes = R.string.action_global_search
switchPreference { switchPreference {
key = Keys.searchPinnedSourcesOnly key = Keys.searchPinnedSourcesOnly
titleRes = R.string.pref_search_pinned_sources_only titleRes = R.string.pref_search_pinned_sources_only
@ -32,3 +41,4 @@ class SettingsBrowseController : SettingsController() {
} }
} }
} }
}

View File

@ -160,7 +160,7 @@
<!-- Library section --> <!-- Library section -->
<string name="pref_category_display">Display</string> <string name="pref_category_display">Display</string>
<string name="pref_library_columns">Library manga per row</string> <string name="pref_library_columns">Items per row</string>
<string name="portrait">Portrait</string> <string name="portrait">Portrait</string>
<string name="landscape">Landscape</string> <string name="landscape">Landscape</string>
<string name="default_columns">Default</string> <string name="default_columns">Default</string>
@ -305,7 +305,7 @@
<!-- Browse section --> <!-- Browse section -->
<string name="pref_enable_automatic_extension_updates">Check for extension updates</string> <string name="pref_enable_automatic_extension_updates">Check for extension updates</string>
<string name="pref_search_pinned_sources_only">Only include pinned sources in global search</string> <string name="pref_search_pinned_sources_only">Only include pinned sources</string>
<!-- Backup section --> <!-- Backup section -->
<string name="backup">Backup</string> <string name="backup">Backup</string>