[fenix] For https://github.com/mozilla-mobile/fenix/issues/27627 - Check the TCP CFR status lazily

Use lazyFeatureFlagPreference as a quick small way to avoid a race between
initializing the value and the Nimbus initialization based on which the value
should be calculated.
This is the same flow that the other MR experiments use.
pull/600/head
Mugurell 2 years ago committed by mergify[bot]
parent c9eedb7965
commit ab2514789b

@ -610,9 +610,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the total cookie protection CRF should be shown.
*/
var shouldShowTotalCookieProtectionCFR by booleanPreference(
var shouldShowTotalCookieProtectionCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_total_cookie_protection_popup),
default = mr2022Sections[Mr2022Section.TCP_CFR] == true,
featureFlag = true,
default = { mr2022Sections[Mr2022Section.TCP_CFR] == true },
)
val blockCookiesSelectionInCustomTrackingProtection by stringPreference(

Loading…
Cancel
Save