[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-149.0a1-16.0-2] TB 44752 [android]: Remove new expanded toolbar option



Title: GitLab

Dan Ballard pushed to branch tor-browser-149.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • a7c83cd7
    by clairehurst at 2026-03-24T16:56:31-06:00
    TB 44752 [android]: Remove new expanded toolbar option
    

4 changed files:

Changes:

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/CustomizationFragment.kt
    ... ... @@ -64,7 +64,6 @@ class CustomizationFragment : PreferenceFragmentCompat() {
    64 64
             val tabletAndTabStripEnabled = Settings(requireContext()).isTabStripEnabled
    
    65 65
             updateToolbarCategoryBasedOnTabStrip(tabletAndTabStripEnabled)
    
    66 66
             setupTabStripCategory()
    
    67
    -        setupToolbarLayout()
    
    68 67
             updateToolbarShortcut()
    
    69 68
     
    
    70 69
             // if tab strip is enabled, swipe toolbar to switch tabs should not be enabled so the
    
    ... ... @@ -189,8 +188,6 @@ class CustomizationFragment : PreferenceFragmentCompat() {
    189 188
                         Position.TOP.name,
    
    190 189
                     ),
    
    191 190
                 )
    
    192
    -
    
    193
    -            updateToolbarLayoutIcons()
    
    194 191
             }
    
    195 192
     
    
    196 193
             val bottomPreference = requirePreference<RadioButtonPreference>(R.string.pref_key_toolbar_bottom)
    
    ... ... @@ -200,8 +197,6 @@ class CustomizationFragment : PreferenceFragmentCompat() {
    200 197
                         Position.BOTTOM.name,
    
    201 198
                     ),
    
    202 199
                 )
    
    203
    -
    
    204
    -            updateToolbarLayoutIcons()
    
    205 200
             }
    
    206 201
     
    
    207 202
             val toolbarPosition = requireContext().settings().toolbarPosition
    
    ... ... @@ -221,35 +216,10 @@ class CustomizationFragment : PreferenceFragmentCompat() {
    221 216
                 val enabled = newValue as Boolean
    
    222 217
                 context.settings().isTabStripEnabled = enabled
    
    223 218
                 updateToolbarCategoryBasedOnTabStrip(enabled)
    
    224
    -            setupToolbarLayout()
    
    225 219
                 true
    
    226 220
             }
    
    227 221
         }
    
    228 222
     
    
    229
    -    private fun setupToolbarLayout() {
    
    230
    -        val settings = requireContext().settings()
    
    231
    -        (requirePreference(R.string.pref_key_customization_category_toolbar_layout) as PreferenceCategory).apply {
    
    232
    -            isVisible = settings.shouldUseComposableToolbar &&
    
    233
    -                    settings.toolbarRedesignEnabled && isTallWindow() && !isWideWindow()
    
    234
    -        }
    
    235
    -
    
    236
    -        val layoutToggle = requirePreference<ToggleRadioButtonPreference>(R.string.pref_key_toolbar_expanded)
    
    237
    -        layoutToggle.setOnToggleChanged {
    
    238
    -            updateToolbarShortcut()
    
    239
    -        }
    
    240
    -        updateToolbarLayoutIcons()
    
    241
    -    }
    
    242
    -
    
    243
    -    private fun updateToolbarLayoutIcons() {
    
    244
    -        (requirePreference(R.string.pref_key_toolbar_expanded) as ToggleRadioButtonPreference).apply {
    
    245
    -            if (requireContext().settings().shouldUseBottomToolbar) {
    
    246
    -                updateIcon(R.drawable.ic_toolbar_bottom_expanded, R.drawable.ic_toolbar_bottom_simple)
    
    247
    -            } else {
    
    248
    -                updateIcon(R.drawable.ic_toolbar_top_expanded, R.drawable.ic_toolbar_top_simple)
    
    249
    -            }
    
    250
    -        }
    
    251
    -    }
    
    252
    -
    
    253 223
         private fun setupGesturesCategory(isSwipeToolbarToSwitchTabsVisible: Boolean) {
    
    254 224
             requirePreference<SwitchPreference>(R.string.pref_key_website_pull_to_refresh).apply {
    
    255 225
                 isVisible = FeatureFlags.PULL_TO_REFRESH_ENABLED
    
    ... ... @@ -280,7 +250,6 @@ class CustomizationFragment : PreferenceFragmentCompat() {
    280 250
     
    
    281 251
         override fun onConfigurationChanged(newConfig: Configuration) {
    
    282 252
             super.onConfigurationChanged(newConfig)
    
    283
    -        setupToolbarLayout()
    
    284 253
             updateToolbarShortcut()
    
    285 254
         }
    
    286 255
     
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
    ... ... @@ -1463,11 +1463,7 @@ class Settings(
    1463 1463
             persistDefaultIfNotExists = true,
    
    1464 1464
         )
    
    1465 1465
     
    
    1466
    -    var shouldUseExpandedToolbar by booleanPreference(
    
    1467
    -        key = appContext.getPreferenceKey(R.string.pref_key_toolbar_expanded),
    
    1468
    -        default = false,
    
    1469
    -        persistDefaultIfNotExists = true,
    
    1470
    -    )
    
    1466
    +    var shouldUseExpandedToolbar = false
    
    1471 1467
     
    
    1472 1468
         var shouldShowToolbarCustomization by booleanPreference(
    
    1473 1469
             key = appContext.getPreferenceKey(R.string.pref_key_enable_toolbar_customization),
    
    ... ... @@ -2238,10 +2234,7 @@ class Settings(
    2238 2234
         /**
    
    2239 2235
          * Indicates if the user has access to the toolbar redesign option in settings.
    
    2240 2236
          */
    
    2241
    -    var toolbarRedesignEnabled by booleanPreference(
    
    2242
    -        appContext.getPreferenceKey(R.string.pref_key_enable_toolbar_redesign),
    
    2243
    -        default = { FxNimbus.features.toolbarRedesignOption.value().showOptions },
    
    2244
    -    )
    
    2237
    +    var toolbarRedesignEnabled = false
    
    2245 2238
     
    
    2246 2239
         /**
    
    2247 2240
          * Indicates if the search bar CFR should be displayed to the user.
    

  • mobile/android/fenix/app/src/main/res/values/preference_keys.xml
    ... ... @@ -181,7 +181,6 @@
    181 181
         <string name="pref_key_toolbar_bottom" translatable="false">pref_key_toolbar_bottom</string>
    
    182 182
         <string name="pref_key_toolbar_tab_swipe_cfr">pref_key_should_show_tab_swipe_cfr</string>
    
    183 183
         <string name="pref_key_toolbar_has_shown_tab_swipe_cfr">pref_key_has_shown_tab_swipe_cfr</string>
    
    184
    -    <string name="pref_key_toolbar_expanded" translatable="false">pref_key_toolbar_expanded</string>
    
    185 184
     
    
    186 185
         <!-- App icon settings-->
    
    187 186
         <string name="pref_key_app_icon">pref_key_app_icon</string>
    
    ... ... @@ -211,7 +210,6 @@
    211 210
         <string name="pref_key_recent_tabs" translatable="false">pref_key_recent_tabs</string>
    
    212 211
         <string name="pref_key_customization_bookmarks" translatable="false">pref_key_recent_bookmarks</string>
    
    213 212
         <string name="pref_key_customization_category_toolbar" translatable="false">pref_key_customization_category_toolbar</string>
    
    214
    -    <string name="pref_key_customization_category_toolbar_layout" translatable="false">pref_key_customization_category_toolbar_layout</string>
    
    215 213
         <string name="pref_key_customization_category_app_icon" translatable="false">pref_key_customization_category_app_icon</string>
    
    216 214
         <string name="pref_key_customization_category_toolbar_shortcut" translatable="false">pref_key_customization_category_toolbar_shortcut</string>
    
    217 215
         <string name="pref_key_toolbar_simple_shortcut" translatable="false">pref_key_toolbar_simple_shortcut</string>
    

  • mobile/android/fenix/app/src/main/res/xml/customization_preferences.xml
    ... ... @@ -69,19 +69,6 @@
    69 69
                 android:title="@string/preference_tab_strip_show" />
    
    70 70
         </androidx.preference.PreferenceCategory>
    
    71 71
     
    
    72
    -    <androidx.preference.PreferenceCategory
    
    73
    -        android:layout="@layout/preference_cat_style"
    
    74
    -        android:title="@string/preferences_toolbar_layout"
    
    75
    -        android:key="@string/pref_key_customization_category_toolbar_layout"
    
    76
    -        android:visible="false"
    
    77
    -        app:iconSpaceReserved="false">
    
    78
    -        <org.mozilla.fenix.settings.ToggleRadioButtonPreference
    
    79
    -            android:key="@string/pref_key_toolbar_expanded"
    
    80
    -            app:sharedPreferenceKey="pref_key_toolbar_expanded"
    
    81
    -            app:falseOptionTitle="@string/preference_simple_toolbar"
    
    82
    -            app:trueOptionTitle="@string/preference_expanded_toolbar" />
    
    83
    -    </androidx.preference.PreferenceCategory>
    
    84
    -
    
    85 72
         <!-- Toolbar shortcut picker -->
    
    86 73
         <androidx.preference.PreferenceCategory
    
    87 74
             android:key="@string/pref_key_customization_category_toolbar_shortcut"
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx