2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

[fenix] Issue https://github.com/mozilla-mobile/fenix/issues/19846: Make sure default browser notification only happens once

This commit is contained in:
Roger Yang 2021-07-14 18:18:48 -04:00 committed by mergify[bot]
parent 814f0ef0c9
commit e671e5314e
2 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,6 @@ class DefaultBrowserIntentProcessor(
override fun process(intent: Intent, navController: NavController, out: Intent): Boolean {
return if (isDefaultBrowserNotificationIntent(intent)) {
activity.openSetDefaultBrowserOption()
activity.settings().defaultBrowserNotificationDisplayed = true
true
} else {

View File

@ -35,6 +35,10 @@ class DefaultBrowserNotificationWorker(
ensureChannelExists()
NotificationManagerCompat.from(applicationContext)
.notify(NOTIFICATION_TAG, NOTIFICATION_ID, buildNotification())
// default browser notification should only happen once
applicationContext.settings().defaultBrowserNotificationDisplayed = true
return Result.success()
}