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:
parent
814f0ef0c9
commit
e671e5314e
@ -24,7 +24,6 @@ class DefaultBrowserIntentProcessor(
|
|||||||
override fun process(intent: Intent, navController: NavController, out: Intent): Boolean {
|
override fun process(intent: Intent, navController: NavController, out: Intent): Boolean {
|
||||||
return if (isDefaultBrowserNotificationIntent(intent)) {
|
return if (isDefaultBrowserNotificationIntent(intent)) {
|
||||||
activity.openSetDefaultBrowserOption()
|
activity.openSetDefaultBrowserOption()
|
||||||
activity.settings().defaultBrowserNotificationDisplayed = true
|
|
||||||
|
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,6 +35,10 @@ class DefaultBrowserNotificationWorker(
|
|||||||
ensureChannelExists()
|
ensureChannelExists()
|
||||||
NotificationManagerCompat.from(applicationContext)
|
NotificationManagerCompat.from(applicationContext)
|
||||||
.notify(NOTIFICATION_TAG, NOTIFICATION_ID, buildNotification())
|
.notify(NOTIFICATION_TAG, NOTIFICATION_ID, buildNotification())
|
||||||
|
|
||||||
|
// default browser notification should only happen once
|
||||||
|
applicationContext.settings().defaultBrowserNotificationDisplayed = true
|
||||||
|
|
||||||
return Result.success()
|
return Result.success()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user