Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
[fenix] For mozilla-mobile/fenix#27627 - Check the TCP CFR status lazily
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mugurell authored and mergify[bot] committed Nov 1, 2022
1 parent d5d9e0c commit f5da8aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f5da8aa

Please sign in to comment.