Skip to content

Commit

Permalink
For mozilla-mobile#9506: Create show open in app banner preference.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarare committed Sep 4, 2020
1 parent 8c797ec commit 0a1409a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/java/org/mozilla/fenix/utils/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = false
)

var shouldShowOpenInAppBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_open_in_app_banner),
default = true
)

@VisibleForTesting(otherwise = PRIVATE)
internal val trackingProtectionOnboardingCount = counterPreference(
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_onboarding),
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/preference_keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@
<!-- A value of `true` means the PWA dialog has been showed or user already has PWAs installed -->
<string name="pref_key_user_knows_about_pwa" translatable="false">pref_key_user_knows_about_pwa</string>

<!-- A value of `true` means the Open In App Banner has not been shown yet -->
<string name="pref_key_should_show_open_in_app_banner" translatable="false">pref_key_should_show_open_in_app_banner</string>

<string name="pref_key_migrating_from_fenix_nightly_tip" translatable="false">pref_key_migrating_from_fenix_nightly_tip</string>
<string name="pref_key_migrating_from_firefox_nightly_tip" translatable="false">pref_key_migrating_from_firefox_nightly_tip</string>
<string name="pref_key_migrating_from_fenix_tip" translatable="false">pref_key_migrating_from_fenix_tip</string>
Expand Down

0 comments on commit 0a1409a

Please sign in to comment.