-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LHN breaking when leaving deep linked room #40701
Conversation
@cubuspl42 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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/libs/actions/Report.ts
Outdated
@@ -2468,7 +2468,8 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>) { | |||
if (lastAccessedReportID) { | |||
// If it is not a chat thread we should call Navigation.goBack to pop the current route first before navigating to last accessed report. | |||
if (!isChatThread) { | |||
Navigation.goBack(); | |||
// Fallback to the lastAccessedReportID route, if this is first route in the navigator | |||
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could extract...
const lastAccessedReportRoute = ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? '');
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this in both branches of the code, so it will never be unused
Reviewer Checklist
Screenshots/VideosAndroid: Nativeand11.webmAndroid: mWeb ChromeiOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.-.2024-04-25.at.23.16.39.mp4iOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-04-25.at.21.31.46.movMacOS: Desktop |
@MonilBhavsar Can you confirm whether this issue still occurs on the main bcoz I am unable to reproduce it? Screen.Recording.2024-04-24.at.12.49.13.movScreen.Recording.2024-04-24.at.12.51.08.mov |
Agree, not sure what fixed it. But we should close this. |
Reopening as bug is reproducible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@cristipaval 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] |
Self-merging |
Thank you for the review! |
✋ 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/MonilBhavsar in version: 1.4.67-0 🚀
|
There seem to be a few app crashes that might have come from this PR
@MonilBhavsar Could you please take a look? |
I have confirmed it is not related to my PR, I'll take a look though |
Hey @MonilBhavsar, I see you investigated already, but are you sure this didn't introduce #41128? This is one of only a few PRs that alters the redirection-when-leaving-room logic. |
Nevermind, I see this doesn't occur when building against this branch 👍 |
Thank you for confirming! |
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.67-7 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.67-7 🚀
|
Details
If the navigation stack is empty, we should use fallback route as a the last accessed report route
cc @marcaaron
Fixed Issues
$ #40680
PROPOSAL:
Tests
Same as QA
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-04-22.at.8.07.12.PM.mov
MacOS: Desktop