-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix App does not navigate to last opened public room in small screen devices after Sign in from a public room link #20654
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1680,6 +1680,18 @@ function setLastOpenedPublicRoom(reportID) { | |
| Onyx.set(ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID, reportID); | ||
| } | ||
|
|
||
| /** | ||
| * Navigates to the last opened public room | ||
| * | ||
| * @param {String} lastOpenedPublicRoomID | ||
| */ | ||
| function openLastOpenedPublicRoom(lastOpenedPublicRoomID) { | ||
| Navigation.isNavigationReady().then(() => { | ||
| setLastOpenedPublicRoom(''); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this needed? Shouldn't the value remain the same?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied from the old logic. But I think it makes sense if we want it trigger only 1 time. That means if we already visit the public room after sign in, then we refresh the page, it won't trigger again. |
||
| Navigation.navigate(ROUTES.getReportRoute(lastOpenedPublicRoomID)); | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Flag a comment as offensive | ||
| * | ||
|
|
@@ -1804,4 +1816,5 @@ export { | |
| leaveRoom, | ||
| setLastOpenedPublicRoom, | ||
| flagComment, | ||
| openLastOpenedPublicRoom, | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.