2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00
* For https://github.com/mozilla-mobile/fenix/issues/15937 - Remove the topFrecentSite feature flag

* For https://github.com/mozilla-mobile/fenix/issues/15937 - Hide the "Pull to refresh" preference since its visibility is managed by a feature flag
This commit is contained in:
Gabriel Luong 2020-10-16 21:37:27 -04:00 committed by GitHub
parent a68b2b2ec0
commit 36ab249924
8 changed files with 6 additions and 32 deletions

View File

@ -21,11 +21,6 @@ object FeatureFlags {
*/
val syncedTabsInTabsTray = Config.channel.isNightlyOrDebug
/**
* Enables showing the top frequently visited sites
*/
const val topFrecentSite = true
/**
* Shows the grid view settings for the tabs tray.
*/

View File

@ -9,7 +9,6 @@ import android.os.Build
import android.os.Build.VERSION.SDK_INT
import android.os.Bundle
import androidx.appcompat.app.AppCompatDelegate
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference
import org.mozilla.fenix.FeatureFlags
@ -136,11 +135,7 @@ class CustomizationFragment : PreferenceFragmentCompat() {
}
private fun setupHomeCategory() {
requirePreference<PreferenceCategory>(R.string.pref_home_category).apply {
isVisible = FeatureFlags.topFrecentSite
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_top_frecent_sites).apply {
isVisible = FeatureFlags.topFrecentSite
isChecked = context.settings().showTopFrecentSites
onPreferenceChangeListener = SharedPreferenceUpdater()
}

View File

@ -31,12 +31,6 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
onPreferenceChangeListener = SharedPreferenceUpdater()
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_top_frecent_sites).apply {
isVisible = FeatureFlags.topFrecentSite
isChecked = context.settings().showTopFrecentSites
onPreferenceChangeListener = SharedPreferenceUpdater()
}
requirePreference<SwitchPreference>(R.string.pref_key_wait_first_paint).apply {
isVisible = FeatureFlags.waitUntilPaintToDraw
isChecked = context.settings().waitToShowPageUntilFirstPaint

View File

@ -100,10 +100,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
override val preferences: SharedPreferences =
appContext.getSharedPreferences(FENIX_PREFERENCES, MODE_PRIVATE)
var showTopFrecentSites by featureFlagPreference(
var showTopFrecentSites by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_enable_top_frecent_sites),
default = true,
featureFlag = FeatureFlags.topFrecentSite
default = true
)
var numberOfAppLaunches by intPreference(

View File

@ -128,7 +128,6 @@
<string name="pref_key_follow_device_theme" translatable="false">pref_key_follow_device_theme</string>
<!-- Customization Settings -->
<string name="pref_home_category" translatable="false">pref_home_category</string>
<string name="pref_key_website_pull_to_refresh" translatable="false">pref_key_website_pull_to_refresh</string>
<string name="pref_key_dynamic_toolbar" translatable="false">pref_key_dynamic_toolbar</string>
<string name="pref_key_swipe_toolbar_switch_tabs" translatable="false">pref_key_swipe_toolbar_switch_tabs</string>

View File

@ -34,8 +34,6 @@
<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 the show top frequently visited sites preference -->
<string name="preferences_debug_settings_enable_top_frecent_sites">Show Top Frequently Visited Sites</string>
<!-- Label for the wait until first paint preference -->
<string name="preferences_debug_settings_wait_first_paint">Wait Until First Paint To Show Page Content</string>
<!-- Label for showing Synced Tabs in the tabs tray -->

View File

@ -46,12 +46,10 @@
</androidx.preference.PreferenceCategory>
<androidx.preference.PreferenceCategory
android:key="@string/pref_home_category"
android:layout="@layout/preference_cat_style"
android:title="@string/preferences_home"
app:allowDividerAbove="true"
app:iconSpaceReserved="false"
app:isPreferenceVisible="false">
app:iconSpaceReserved="false">
<androidx.preference.SwitchPreference
android:key="@string/pref_key_enable_top_frecent_sites"
android:title="@string/top_sites_toggle_top_frecent_sites" />
@ -64,7 +62,8 @@
app:iconSpaceReserved="false">
<androidx.preference.SwitchPreference
android:key="@string/pref_key_website_pull_to_refresh"
android:title="@string/preference_gestures_website_pull_to_refresh" />
android:title="@string/preference_gestures_website_pull_to_refresh"
app:isPreferenceVisible="false" />
<androidx.preference.SwitchPreference
android:key="@string/pref_key_dynamic_toolbar"
android:title="@string/preference_gestures_dynamic_toolbar" />
@ -74,6 +73,6 @@
<androidx.preference.SwitchPreference
android:key="@string/pref_key_swipe_toolbar_show_tabs"
android:title="@string/preference_gestures_swipe_toolbar_show_tabs"
app:isPreferenceVisible="false"/>
app:isPreferenceVisible="false" />
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@ -9,11 +9,6 @@
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_enable_top_frecent_sites"
android:title="@string/preferences_debug_settings_enable_top_frecent_sites"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/pref_key_wait_first_paint"