-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve feature toggle API to actually use default value #1822
Changes from 1 commit
f918365
8fc57a4
d83e987
2a05ee7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ class GlobalPrivacyControlViewModel( | |
init { | ||
_viewState.value = ViewState( | ||
globalPrivacyControlEnabled = gpc.isEnabled(), | ||
globalPrivacyControlFeatureEnabled = featureToggle.isFeatureEnabled(PrivacyFeatureName.GpcFeatureName(), true) == true | ||
globalPrivacyControlFeatureEnabled = featureToggle.isFeatureEnabled(PrivacyFeatureName.GpcFeatureName, true) == true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: We don't need |
||
) | ||
pixel.fire(SETTINGS_DO_NOT_SELL_SHOWN) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ class HttpsUpgraderImpl @Inject constructor( | |
override fun shouldUpgrade(uri: Uri): Boolean { | ||
val host = uri.host ?: return false | ||
|
||
if (toggle.isFeatureEnabled(PrivacyFeatureName.HttpsFeatureName()) != true) { | ||
if (toggle.isFeatureEnabled(PrivacyFeatureName.HttpsFeatureName) != true) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: This could now be |
||
Timber.d("https is disabled in the remote config and so $host is not upgradable") | ||
return false | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,7 +149,7 @@ class SettingsViewModel( | |
automaticallyClearData = AutomaticallyClearData(automaticallyClearWhat, automaticallyClearWhen, automaticallyClearWhenEnabled), | ||
appIcon = settingsDataStore.appIcon, | ||
selectedFireAnimation = settingsDataStore.selectedFireAnimation, | ||
globalPrivacyControlEnabled = gpc.isEnabled() && featureToggle.isFeatureEnabled(PrivacyFeatureName.GpcFeatureName()) == true, | ||
globalPrivacyControlEnabled = gpc.isEnabled() && featureToggle.isFeatureEnabled(PrivacyFeatureName.GpcFeatureName) == true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: We don't need |
||
appLinksSettingType = getAppLinksSettingsState(settingsDataStore.appLinksEnabled, settingsDataStore.showAppLinksPrompt), | ||
appTrackingProtectionEnabled = TrackerBlockingVpnService.isServiceRunning(appContext), | ||
appTrackingProtectionWaitlistState = atpRepository.getState() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We don't need
== true
anymore