Unverified Commit 10485212 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Issue #19846: Make sure default browser notification only happens once (#20383)



(cherry picked from commit 68b56ff2)

Co-authored-by: default avatarRoger Yang <royang@mozilla.com>
parent 0f13705c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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 {
+4 −0
Original line number Diff line number Diff line
@@ -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()
    }