mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-11 13:11:01 +00:00
* For #15937 - Remove the topFrecentSite feature flag * For #15937 - Hide the "Pull to refresh" preference since its visibility is managed by a feature flag
This commit is contained in:
parent
6d699105ad
commit
87ec7a77ae
@ -21,11 +21,6 @@ object FeatureFlags {
|
|||||||
*/
|
*/
|
||||||
val syncedTabsInTabsTray = Config.channel.isNightlyOrDebug
|
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.
|
* Shows the grid view settings for the tabs tray.
|
||||||
*/
|
*/
|
||||||
|
@ -9,7 +9,6 @@ import android.os.Build
|
|||||||
import android.os.Build.VERSION.SDK_INT
|
import android.os.Build.VERSION.SDK_INT
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.preference.PreferenceCategory
|
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.SwitchPreference
|
import androidx.preference.SwitchPreference
|
||||||
import org.mozilla.fenix.FeatureFlags
|
import org.mozilla.fenix.FeatureFlags
|
||||||
@ -136,11 +135,7 @@ class CustomizationFragment : PreferenceFragmentCompat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupHomeCategory() {
|
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 {
|
requirePreference<SwitchPreference>(R.string.pref_key_enable_top_frecent_sites).apply {
|
||||||
isVisible = FeatureFlags.topFrecentSite
|
|
||||||
isChecked = context.settings().showTopFrecentSites
|
isChecked = context.settings().showTopFrecentSites
|
||||||
onPreferenceChangeListener = SharedPreferenceUpdater()
|
onPreferenceChangeListener = SharedPreferenceUpdater()
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,6 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
|
|||||||
onPreferenceChangeListener = SharedPreferenceUpdater()
|
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 {
|
requirePreference<SwitchPreference>(R.string.pref_key_wait_first_paint).apply {
|
||||||
isVisible = FeatureFlags.waitUntilPaintToDraw
|
isVisible = FeatureFlags.waitUntilPaintToDraw
|
||||||
isChecked = context.settings().waitToShowPageUntilFirstPaint
|
isChecked = context.settings().waitToShowPageUntilFirstPaint
|
||||||
|
@ -100,10 +100,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|||||||
override val preferences: SharedPreferences =
|
override val preferences: SharedPreferences =
|
||||||
appContext.getSharedPreferences(FENIX_PREFERENCES, MODE_PRIVATE)
|
appContext.getSharedPreferences(FENIX_PREFERENCES, MODE_PRIVATE)
|
||||||
|
|
||||||
var showTopFrecentSites by featureFlagPreference(
|
var showTopFrecentSites by booleanPreference(
|
||||||
appContext.getPreferenceKey(R.string.pref_key_enable_top_frecent_sites),
|
appContext.getPreferenceKey(R.string.pref_key_enable_top_frecent_sites),
|
||||||
default = true,
|
default = true
|
||||||
featureFlag = FeatureFlags.topFrecentSite
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var numberOfAppLaunches by intPreference(
|
var numberOfAppLaunches by intPreference(
|
||||||
|
@ -128,7 +128,6 @@
|
|||||||
<string name="pref_key_follow_device_theme" translatable="false">pref_key_follow_device_theme</string>
|
<string name="pref_key_follow_device_theme" translatable="false">pref_key_follow_device_theme</string>
|
||||||
|
|
||||||
<!-- Customization Settings -->
|
<!-- 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_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_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>
|
<string name="pref_key_swipe_toolbar_switch_tabs" translatable="false">pref_key_swipe_toolbar_switch_tabs</string>
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<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 -->
|
<!-- Label for showing Synced Tabs in the tabs tray -->
|
||||||
|
@ -46,12 +46,10 @@
|
|||||||
</androidx.preference.PreferenceCategory>
|
</androidx.preference.PreferenceCategory>
|
||||||
|
|
||||||
<androidx.preference.PreferenceCategory
|
<androidx.preference.PreferenceCategory
|
||||||
android:key="@string/pref_home_category"
|
|
||||||
android:layout="@layout/preference_cat_style"
|
android:layout="@layout/preference_cat_style"
|
||||||
android:title="@string/preferences_home"
|
android:title="@string/preferences_home"
|
||||||
app:allowDividerAbove="true"
|
app:allowDividerAbove="true"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false">
|
||||||
app:isPreferenceVisible="false">
|
|
||||||
<androidx.preference.SwitchPreference
|
<androidx.preference.SwitchPreference
|
||||||
android:key="@string/pref_key_enable_top_frecent_sites"
|
android:key="@string/pref_key_enable_top_frecent_sites"
|
||||||
android:title="@string/top_sites_toggle_top_frecent_sites" />
|
android:title="@string/top_sites_toggle_top_frecent_sites" />
|
||||||
@ -64,7 +62,8 @@
|
|||||||
app:iconSpaceReserved="false">
|
app:iconSpaceReserved="false">
|
||||||
<androidx.preference.SwitchPreference
|
<androidx.preference.SwitchPreference
|
||||||
android:key="@string/pref_key_website_pull_to_refresh"
|
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
|
<androidx.preference.SwitchPreference
|
||||||
android:key="@string/pref_key_dynamic_toolbar"
|
android:key="@string/pref_key_dynamic_toolbar"
|
||||||
android:title="@string/preference_gestures_dynamic_toolbar" />
|
android:title="@string/preference_gestures_dynamic_toolbar" />
|
||||||
@ -74,6 +73,6 @@
|
|||||||
<androidx.preference.SwitchPreference
|
<androidx.preference.SwitchPreference
|
||||||
android:key="@string/pref_key_swipe_toolbar_show_tabs"
|
android:key="@string/pref_key_swipe_toolbar_show_tabs"
|
||||||
android:title="@string/preference_gestures_swipe_toolbar_show_tabs"
|
android:title="@string/preference_gestures_swipe_toolbar_show_tabs"
|
||||||
app:isPreferenceVisible="false"/>
|
app:isPreferenceVisible="false" />
|
||||||
</androidx.preference.PreferenceCategory>
|
</androidx.preference.PreferenceCategory>
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
||||||
|
@ -9,11 +9,6 @@
|
|||||||
android:key="@string/pref_key_show_grid_view_tabs_settings"
|
android:key="@string/pref_key_show_grid_view_tabs_settings"
|
||||||
android:title="@string/preferences_debug_settings_show_grid_view_tabs_settings"
|
android:title="@string/preferences_debug_settings_show_grid_view_tabs_settings"
|
||||||
app:iconSpaceReserved="false" />
|
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
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/pref_key_wait_first_paint"
|
android:key="@string/pref_key_wait_first_paint"
|
||||||
|
Loading…
Reference in New Issue
Block a user