Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
fenix
Commits
7cc59bfb
Commit
7cc59bfb
authored
Sep 11, 2020
by
Matthew Finkel
Browse files
Bug 40034: Disable PWA onboading
parent
45924165
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/shortcut/PwaOnboardingObserver.kt
View file @
7cc59bfb
...
...
@@ -22,8 +22,9 @@ class PwaOnboardingObserver(
)
:
Session
.
Observer
{
override
fun
onLoadingStateChanged
(
session
:
Session
,
loading
:
Boolean
)
{
@SuppressWarnings
(
"CollapsibleIfStatements"
)
if
(!
loading
&&
webAppUseCases
.
isInstallable
()
&&
!
settings
.
userKnowsAboutPwas
)
{
settings
.
incrementVisitedInstallableCount
()
//
settings.incrementVisitedInstallableCount()
if
(
settings
.
shouldShowPwaCfr
)
{
val
directions
=
BrowserFragmentDirections
.
actionBrowserFragmentToPwaOnboardingDialogFragment
()
...
...
app/src/main/java/org/mozilla/fenix/utils/Settings.kt
View file @
7cc59bfb
...
...
@@ -683,7 +683,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var
userKnowsAboutPwas
by
booleanPreference
(
appContext
.
getPreferenceKey
(
R
.
string
.
pref_key_user_knows_about_pwa
),
default
=
fals
e
default
=
tru
e
)
var
shouldShowOpenInAppBanner
by
booleanPreference
(
...
...
app/src/test/java/org/mozilla/fenix/utils/SettingsTest.kt
View file @
7cc59bfb
...
...
@@ -431,7 +431,7 @@ class SettingsTest {
settings
.
incrementVisitedInstallableCount
()
// Then
assert
Tru
e
(
settings
.
shouldShowPwaCfr
)
assert
Fals
e
(
settings
.
shouldShowPwaCfr
)
}
@Test
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment