mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/15761 - [Grid View] Enable the grid view and remove its feature flag (https://github.com/mozilla-mobile/fenix/pull/16546)
* For https://github.com/mozilla-mobile/fenix/issues/15761 - Part 1: Turn ON the showGridViewInTabsSettings feature flag * For https://github.com/mozilla-mobile/fenix/issues/15761 - Part 2: Remove the showGridViewInTabsSettings feature flag and show the Tab view preference category
This commit is contained in:
parent
3f3bd2e52c
commit
4a21bcd11c
@ -21,11 +21,6 @@ object FeatureFlags {
|
||||
*/
|
||||
val syncedTabsInTabsTray = Config.channel.isNightlyOrDebug
|
||||
|
||||
/**
|
||||
* Shows the grid view settings for the tabs tray.
|
||||
*/
|
||||
val showGridViewInTabsSettings = Config.channel.isNightlyOrDebug
|
||||
|
||||
/**
|
||||
* Enables downloads with external download managers.
|
||||
*/
|
||||
|
@ -25,12 +25,6 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.secret_settings_preferences, rootKey)
|
||||
|
||||
requirePreference<SwitchPreference>(R.string.pref_key_show_grid_view_tabs_settings).apply {
|
||||
isVisible = FeatureFlags.showGridViewInTabsSettings
|
||||
isChecked = context.settings().showGridViewInTabsSettings
|
||||
onPreferenceChangeListener = SharedPreferenceUpdater()
|
||||
}
|
||||
|
||||
requirePreference<SwitchPreference>(R.string.pref_key_synced_tabs_tabs_tray).apply {
|
||||
isVisible = FeatureFlags.syncedTabsInTabsTray
|
||||
isChecked = context.settings().syncedTabsInTabsTray
|
||||
|
@ -6,12 +6,10 @@ package org.mozilla.fenix.settings
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.preference.PreferenceCategory
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.metrics.Event
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.ext.showToolbar
|
||||
import org.mozilla.fenix.utils.view.addToRadioGroup
|
||||
|
||||
@ -51,10 +49,6 @@ class TabsSettingsFragment : PreferenceFragmentCompat() {
|
||||
radioOneMonth = requirePreference(R.string.pref_key_close_tabs_after_one_month)
|
||||
|
||||
setupRadioGroups()
|
||||
|
||||
requirePreference<PreferenceCategory>(R.string.pref_key_tab_view_category).apply {
|
||||
isVisible = context.settings().showGridViewInTabsSettings
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupRadioGroups() {
|
||||
|
@ -272,7 +272,6 @@ class TabTrayView(
|
||||
|
||||
@Suppress("ComplexCondition")
|
||||
if (
|
||||
view.context.settings().showGridViewInTabsSettings &&
|
||||
view.context.settings().shouldShowGridViewBanner &&
|
||||
view.context.settings().canShowCfr &&
|
||||
tabs.size >= TAB_COUNT_SHOW_CFR
|
||||
|
@ -123,12 +123,6 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
||||
val canShowCfr: Boolean
|
||||
get() = (System.currentTimeMillis() - lastCfrShownTimeInMillis) > THREE_DAYS_MS
|
||||
|
||||
var showGridViewInTabsSettings by featureFlagPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_grid_view_tabs_settings),
|
||||
default = Config.channel.isNightlyOrDebug,
|
||||
featureFlag = FeatureFlags.showGridViewInTabsSettings
|
||||
)
|
||||
|
||||
var syncedTabsInTabsTray by featureFlagPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_synced_tabs_tabs_tray),
|
||||
default = false,
|
||||
|
@ -220,7 +220,6 @@
|
||||
<string name="pref_key_show_collections_placeholder_home" translatable="false">pref_key_show_collections_home</string>
|
||||
|
||||
<!-- Tabs Settings -->
|
||||
<string name="pref_key_tab_view_category" translatable="false">pref_key_tab_view_category</string>
|
||||
<string name="pref_key_tab_view_list" translatable="false">pref_key_tab_view_list</string>
|
||||
<string name="pref_key_tab_view_grid" translatable="false">pref_key_tab_view_grid</string>
|
||||
<string name="pref_key_tabs" translatable="false">pref_key_tabs</string>
|
||||
@ -228,7 +227,6 @@
|
||||
<string name="pref_key_close_tabs_after_one_day" translatable="false">pref_key_close_tabs_after_one_day</string>
|
||||
<string name="pref_key_close_tabs_after_one_week" translatable="false">pref_key_close_tabs_after_one_week</string>
|
||||
<string name="pref_key_close_tabs_after_one_month" translatable="false">pref_key_close_tabs_after_one_month</string>
|
||||
<string name="pref_key_show_grid_view_tabs_settings" translatable="false">pref_key_show_grid_view_tabs_settings</string>
|
||||
|
||||
<string name="pref_key_camera_permissions_needed" translatable="false">pref_key_camera_permissions_needed</string>
|
||||
|
||||
|
@ -32,8 +32,6 @@
|
||||
|
||||
<!-- Label for the secret settings preference -->
|
||||
<string name="preferences_debug_settings">Secret Settings</string>
|
||||
<!-- Label for the show grid view in tabs setting preference -->
|
||||
<string name="preferences_debug_settings_show_grid_view_tabs_settings">Show Grid View in Tabs Settings</string>
|
||||
<!-- Label for showing Synced Tabs in the tabs tray -->
|
||||
<string name="preferences_debug_synced_tabs_tabs_tray">Show Synced Tabs in the tabs tray</string>
|
||||
|
||||
|
@ -4,11 +4,6 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/pref_key_show_grid_view_tabs_settings"
|
||||
android:title="@string/preferences_debug_settings_show_grid_view_tabs_settings"
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/pref_key_synced_tabs_tabs_tray"
|
||||
|
@ -5,12 +5,10 @@
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.preference.PreferenceCategory
|
||||
android:key="@string/pref_key_tab_view_category"
|
||||
android:layout="@layout/preference_cat_style"
|
||||
android:title="@string/preferences_tab_view"
|
||||
app:allowDividerAbove="false"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isPreferenceVisible="false">
|
||||
app:iconSpaceReserved="false">
|
||||
<org.mozilla.fenix.settings.RadioButtonPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/pref_key_tab_view_list"
|
||||
|
Loading…
Reference in New Issue
Block a user