fix: User navigated to incorrect section when opening notification and tapping back button#57871
fix: User navigated to incorrect section when opening notification and tapping back button#57871madmax330 merged 7 commits intoExpensify:mainfrom
Conversation
…d tapping back button
|
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-03.at.2.50.22.PM.movAndroid: mWeb ChromeScreen.Recording.2025-04-03.at.2.55.25.PM.moviOS: NativeScreen.Recording.2025-04-03.at.3.06.02.PM.moviOS: mWeb SafariScreen.Recording.2025-04-03.at.2.56.29.PM.mov |
|
@truph01 Why are you missing the iOS recording? |
@allroundexperts I already asked about how to receive push notifications in IOS here. So, I cannot add the test video in IOS native, and I will update it later if I can test PR on this platform. |
|
@truph01 Can you please resolve the conflicts? |
|
@allroundexperts I resolved conflicts |
|
@truph01 Can you please resolve again? |
|
@allroundexperts I just merged main again. |
|
@truph01 I am not able to receive notifications on Android simulator. Did you do any special setting to get those? |
|
@allroundexperts I follow this section: https://github.com/Expensify/App/blob/main/README.md#receiving-notifications Did you try it? |
Nops, didn't saw that. I tried it now and it works good on Android. |
|
I won't be able to test on iOS as I don't have the certificates / credentials. |
|
I think android test should be good enough. |
|
There's conflicts on the branch |
|
@allroundexperts I just merged main and resolved the conflicts. |
|
More conflicts 🙃 |
|
@madmax330 I don't see them. |
|
Oh I hand't refreshed my page 🤦🏽 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.1.28-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.28-15 🚀
|
|
|
||
| Log.info('[PushNotification] onSelected() - Navigation is ready. Navigating...', false, {reportID}); | ||
| Navigation.navigateToReportWithPolicyCheck({reportID: String(reportID), policyIDToCheck: policyID}); | ||
| Navigation.navigateToReportWithPolicyCheck({reportID: String(reportID), policyIDToCheck: policyID, backTo: Navigation.getActiveRoute()}); |
There was a problem hiding this comment.
Coming from the #62261 checklist: We missed handling the case where opening a notification on the same active route leads to a duplicated navigation stack.


Explanation of Change
Fixed Issues
$ #57091
PROPOSAL: #57091 (comment)
Tests
Android/IOS Native
Other platforms (This PR only applied to Android/IOS native device, so with other platforms, just need to make sure the back button in top left still works properly):
Offline tests
QA Steps
Android/IOS Native
Other platforms (This PR only applied to Android/IOS native device, so with other platforms, just need to make sure the back button in top left still works properly):
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-03-06.at.00.28.39.mov
Android: mWeb Chrome
Screen.Recording.2025-03-06.at.00.32.15.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2025-03-06.at.00.33.49.mov
MacOS: Chrome / Safari
Screen.Recording.2025-03-06.at.00.30.11.mov
MacOS: Desktop
Screen.Recording.2025-03-06.at.00.32.49.mov