Commit 7cc59bfb authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Bug 40034: Disable PWA onboading

parent 45924165
...@@ -22,8 +22,9 @@ class PwaOnboardingObserver( ...@@ -22,8 +22,9 @@ class PwaOnboardingObserver(
) : Session.Observer { ) : Session.Observer {
override fun onLoadingStateChanged(session: Session, loading: Boolean) { override fun onLoadingStateChanged(session: Session, loading: Boolean) {
@SuppressWarnings("CollapsibleIfStatements")
if (!loading && webAppUseCases.isInstallable() && !settings.userKnowsAboutPwas) { if (!loading && webAppUseCases.isInstallable() && !settings.userKnowsAboutPwas) {
settings.incrementVisitedInstallableCount() // settings.incrementVisitedInstallableCount()
if (settings.shouldShowPwaCfr) { if (settings.shouldShowPwaCfr) {
val directions = val directions =
BrowserFragmentDirections.actionBrowserFragmentToPwaOnboardingDialogFragment() BrowserFragmentDirections.actionBrowserFragmentToPwaOnboardingDialogFragment()
......
...@@ -683,7 +683,7 @@ class Settings(private val appContext: Context) : PreferencesHolder { ...@@ -683,7 +683,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var userKnowsAboutPwas by booleanPreference( var userKnowsAboutPwas by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_user_knows_about_pwa), appContext.getPreferenceKey(R.string.pref_key_user_knows_about_pwa),
default = false default = true
) )
var shouldShowOpenInAppBanner by booleanPreference( var shouldShowOpenInAppBanner by booleanPreference(
......
...@@ -431,7 +431,7 @@ class SettingsTest { ...@@ -431,7 +431,7 @@ class SettingsTest {
settings.incrementVisitedInstallableCount() settings.incrementVisitedInstallableCount()
// Then // Then
assertTrue(settings.shouldShowPwaCfr) assertFalse(settings.shouldShowPwaCfr)
} }
@Test @Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment