From fd29987cd154e9bb820991e2950b8baedf06b4dd Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Mon, 30 Sep 2024 14:57:17 +0200 Subject: [PATCH] refactor: Move tab-tap preference to labs (#958) Allows user feedback on this before promoting to a main feature. --- .../components/preference/LabPreferencesFragment.kt | 9 +++++++++ .../pachli/components/preference/PreferencesFragment.kt | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/app/pachli/components/preference/LabPreferencesFragment.kt b/app/src/main/java/app/pachli/components/preference/LabPreferencesFragment.kt index 7d06231b7..5bce34f0f 100644 --- a/app/src/main/java/app/pachli/components/preference/LabPreferencesFragment.kt +++ b/app/src/main/java/app/pachli/components/preference/LabPreferencesFragment.kt @@ -25,7 +25,9 @@ import androidx.preference.PreferenceFragmentCompat import androidx.preference.SwitchPreferenceCompat import app.pachli.R import app.pachli.core.preferences.PrefKeys +import app.pachli.core.preferences.TabTapBehaviour import app.pachli.databinding.FragmentLabPreferencesWarningBinding +import app.pachli.settings.enumListPreference import app.pachli.settings.makePreferenceScreen import app.pachli.settings.switchPreference @@ -56,6 +58,13 @@ class LabPreferencesFragment : PreferenceFragmentCompat() { } isIconSpaceReserved = false } + + enumListPreference { + setDefaultValue(TabTapBehaviour.JUMP_TO_NEXT_PAGE) + setTitle(app.pachli.core.preferences.R.string.pref_title_tab_tap) + key = PrefKeys.TAB_TAP_BEHAVIOUR + isIconSpaceReserved = false + } } } diff --git a/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt b/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt index f5d0a3550..6876cb26e 100644 --- a/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt +++ b/app/src/main/java/app/pachli/components/preference/PreferencesFragment.kt @@ -54,7 +54,6 @@ import app.pachli.core.preferences.AppTheme import app.pachli.core.preferences.DownloadLocation import app.pachli.core.preferences.PrefKeys import app.pachli.core.preferences.SharedPreferencesRepository -import app.pachli.core.preferences.TabTapBehaviour import app.pachli.core.ui.extensions.await import app.pachli.core.ui.makeIcon import app.pachli.databinding.AccountNotificationDetailsListItemBinding @@ -301,12 +300,6 @@ class PreferencesFragment : PreferenceFragmentCompat() { setTitle(R.string.pref_title_enable_swipe_for_tabs) isSingleLineTitle = false } - - enumListPreference { - setDefaultValue(TabTapBehaviour.JUMP_TO_NEXT_PAGE) - setTitle(app.pachli.core.preferences.R.string.pref_title_tab_tap) - key = PrefKeys.TAB_TAP_BEHAVIOUR - } } preferenceCategory(app.pachli.core.preferences.R.string.pref_category_downloads) {