Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
fenix
Commits
a67561b3
Commit
a67561b3
authored
Sep 11, 2020
by
Matthew Finkel
Browse files
Bug 40034: Disable PWA onboading
parent
433ba394
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/shortcut/PwaOnboardingObserver.kt
View file @
a67561b3
...
...
@@ -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 @
a67561b3
...
...
@@ -728,7 +728,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 @
a67561b3
...
...
@@ -445,7 +445,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
.
Attach a 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