[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/16535)

pull/600/head
Gabriel Luong 4 years ago committed by GitHub
parent 6486465645
commit 350be5af87

@ -21,11 +21,6 @@ object FeatureFlags {
*/ */
val syncedTabsInTabsTray = Config.channel.isNightlyOrDebug 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. * Enables downloads with external download managers.
*/ */

@ -25,12 +25,6 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.secret_settings_preferences, rootKey) 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 { requirePreference<SwitchPreference>(R.string.pref_key_synced_tabs_tabs_tray).apply {
isVisible = FeatureFlags.syncedTabsInTabsTray isVisible = FeatureFlags.syncedTabsInTabsTray
isChecked = context.settings().syncedTabsInTabsTray isChecked = context.settings().syncedTabsInTabsTray

@ -6,12 +6,10 @@ package org.mozilla.fenix.settings
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceFragmentCompat
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar import org.mozilla.fenix.ext.showToolbar
import org.mozilla.fenix.utils.view.addToRadioGroup 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) radioOneMonth = requirePreference(R.string.pref_key_close_tabs_after_one_month)
setupRadioGroups() setupRadioGroups()
requirePreference<PreferenceCategory>(R.string.pref_key_tab_view_category).apply {
isVisible = context.settings().showGridViewInTabsSettings
}
} }
private fun setupRadioGroups() { private fun setupRadioGroups() {

@ -123,12 +123,6 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val canShowCfr: Boolean val canShowCfr: Boolean
get() = (System.currentTimeMillis() - lastCfrShownTimeInMillis) > THREE_DAYS_MS 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( var syncedTabsInTabsTray by featureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_synced_tabs_tabs_tray), appContext.getPreferenceKey(R.string.pref_key_synced_tabs_tabs_tray),
default = false, default = false,

@ -220,7 +220,6 @@
<string name="pref_key_show_collections_placeholder_home" translatable="false">pref_key_show_collections_home</string> <string name="pref_key_show_collections_placeholder_home" translatable="false">pref_key_show_collections_home</string>
<!-- Tabs Settings --> <!-- 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_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_tab_view_grid" translatable="false">pref_key_tab_view_grid</string>
<string name="pref_key_tabs" translatable="false">pref_key_tabs</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_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_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_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> <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 --> <!-- Label for the secret settings preference -->
<string name="preferences_debug_settings">Secret Settings</string> <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 --> <!-- 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> <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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> 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 <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_key_synced_tabs_tabs_tray" 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" <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.PreferenceCategory <androidx.preference.PreferenceCategory
android:key="@string/pref_key_tab_view_category"
android:layout="@layout/preference_cat_style" android:layout="@layout/preference_cat_style"
android:title="@string/preferences_tab_view" android:title="@string/preferences_tab_view"
app:allowDividerAbove="false" app:allowDividerAbove="false"
app:iconSpaceReserved="false" app:iconSpaceReserved="false">
app:isPreferenceVisible="false">
<org.mozilla.fenix.settings.RadioButtonPreference <org.mozilla.fenix.settings.RadioButtonPreference
android:defaultValue="true" android:defaultValue="true"
android:key="@string/pref_key_tab_view_list" android:key="@string/pref_key_tab_view_list"

Loading…
Cancel
Save