Verified Commit 8be32858 authored by clairehurst's avatar clairehurst 🌱 Committed by boklm
Browse files

TB 44694: [android] Remove new Tab bar feature

parent f05e9611
Loading
Loading
Loading
Loading
+0 −16
Changes for mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/CustomizationFragment.kt: 0 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -117,7 +117,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
@@ -315,21 +314,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
Changes for mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -2158,11 +2158,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
Changes for mobile/android/fenix/app/src/main/res/xml/customization_preferences.xml: 0 added lines, 9 removed lines.
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"