Fix: Notification click not foreground the app in the first click if app is closed and no clickListener is added#2259
Merged
jinliu9508 merged 3 commits intomainfrom Feb 24, 2025
Conversation
f9ccc01 to
f21b96d
Compare
jkasten2
approved these changes
Feb 21, 2025
f21b96d to
f5cde9a
Compare
Contributor
Author
|
Squashing and removing commits around reproducing the issue. |
Merged
1 task
This was referenced Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
This PR fixes a bug where clicking on a notification does not always bring the app to the foreground under certain conditions.
Details
Motivation
Some users have reported that clicking a notification for the first time does not foreground the app when it is fully closed. This creates unexpected behavior, and we aim to ensure the app opens correctly when a notification is clicked.
Scope
This PR will result in two app behavior changes:
OPTIONAL - Root cause explained
* There is a subscriber in 'extOpenedCallback', or
* 'setInternalNotificationLifecycleCallback' is called and subscribed.
Testing
Unit testing
Manual testing
To reproduce the scenario:
Expected: The notification should open the app.
Observed (before fix): The first click neither opened the app nor cleared the notification.
After the fix, we can observe that the first click always open the app and clear the notification tray.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is