Commit 3096b582 authored by clairehurst's avatar clairehurst 🌱 Committed by Pier Angelo Vendrame
Browse files

TB 44694: [android] Remove new Tab bar feature

parent fdf0a743
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ class CustomizationFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFrag
        setupRadioGroups()
        val tabletAndTabStripEnabled = Settings(requireContext()).isTabStripEnabled
        updateToolbarCategoryBasedOnTabStrip(tabletAndTabStripEnabled)
        setupTabStripCategory()
        updateToolbarShortcut()

        // if tab strip is enabled, swipe toolbar to switch tabs should not be enabled so the
@@ -294,21 +293,6 @@ class CustomizationFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFrag
        addToRadioGroup(topPreference, bottomPreference)
    }

    private fun setupTabStripCategory() {
        val tabStripSwitch = requirePreference<SwitchPreferenceCompat>(R.string.pref_key_tab_strip_show)
        val context = requireContext()

        tabStripSwitch.isChecked = Settings(requireContext()).isTabStripEnabled

        tabStripSwitch.setOnPreferenceChangeListener { _, newValue ->
            val enabled = newValue as Boolean
            context.components.settings.isTabStripEnabled = enabled
            updateToolbarCategoryBasedOnTabStrip(enabled)
            updateToolbarShortcut()
            true
        }
    }

    private fun setupGesturesCategory(
        isSwipeToolbarToSwitchTabsVisible: Boolean,
        isSummarizationEnabled: Boolean,
+1 −5
Original line number Diff line number Diff line
@@ -2168,11 +2168,7 @@ class Settings(
    var shouldShowSearchOptimizationFlightCard = false
    var shouldShowSearchOptimizationSportCard = false

    var isTabStripEnabled by booleanPreference(
        appContext.getPreferenceKey(R.string.pref_key_tab_strip_show),
        default = FxNimbus.features.tabStrip.value().enabled &&
                (isTabStripEligible(appContext) || FxNimbus.features.tabStrip.value().allowOnAllDevices),
    )
    val isTabStripEnabled = false

    var isDynamicToolbarEnabled = false

+0 −9
Original line number Diff line number Diff line
@@ -61,15 +61,6 @@
            android:selectable="false" />
    </androidx.preference.PreferenceCategory>

    <androidx.preference.PreferenceCategory
        android:layout="@layout/preference_cat_style"
        android:title="@string/preferences_tab_strip"
        app:iconSpaceReserved="false">
        <androidx.preference.SwitchPreferenceCompat
            android:key="@string/pref_key_tab_strip_show"
            android:title="@string/preference_tab_strip_show" />
    </androidx.preference.PreferenceCategory>

    <!-- Toolbar shortcut picker -->
    <androidx.preference.PreferenceCategory
        android:key="@string/pref_key_customization_category_toolbar_shortcut"