Close #26475: Remove more feature flags

This commit is contained in:
Jonathan Almeida 2022-11-15 15:52:41 -05:00 committed by mergify[bot]
parent a343d60478
commit 840c91d9e8
4 changed files with 2 additions and 14 deletions

View File

@ -31,11 +31,6 @@ object FeatureFlags {
*/
const val syncAddressesFeature = false
/**
* Enables UI features based on history metadata.
*/
const val historyMetadataUIFeature = true
/**
* Show Pocket recommended stories on home.
*/

View File

@ -143,7 +143,6 @@ class HomeSettingsFragment : PreferenceFragmentCompat() {
}
requirePreference<SwitchPreference>(R.string.pref_key_history_metadata_feature).apply {
isVisible = FeatureFlags.historyMetadataUIFeature
isChecked = context.settings().historyMetadataUIFeature
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {

View File

@ -1257,11 +1257,6 @@ class Settings(private val appContext: Context) : PreferencesHolder {
).contains(langTag)
}
private var isHistoryMetadataEnabled by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_history_metadata_feature),
default = false,
)
private val mr2022Sections: Map<Mr2022Section, Boolean>
get() =
FxNimbus.features.mr2022.value().sectionsEnabled
@ -1277,7 +1272,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var historyMetadataUIFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_history_metadata_feature),
default = { homescreenSections[HomeScreenSection.RECENT_EXPLORATIONS] == true },
featureFlag = FeatureFlags.historyMetadataUIFeature || isHistoryMetadataEnabled,
featureFlag = true,
)
/**

View File

@ -25,8 +25,7 @@
<androidx.preference.SwitchPreference
android:key="@string/pref_key_history_metadata_feature"
android:title="@string/customize_toggle_recently_visited"
app:isPreferenceVisible="false" />
android:title="@string/customize_toggle_recently_visited" />
<androidx.preference.SwitchPreference
android:key="@string/pref_key_pocket_homescreen_recommendations"