-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 is disappeared when leaving thread #28702
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 |
---|---|---|
|
@@ -314,7 +314,15 @@ function ReportScreen({ | |
// optimistic case | ||
(prevOnyxReportID && prevOnyxReportID === routeReportID && !onyxReportID && prevReport.statusNum === CONST.REPORT.STATUS.OPEN && report.statusNum === CONST.REPORT.STATUS.CLOSED) | ||
) { | ||
Navigation.goBack(); | ||
Navigation.dismissModal(); | ||
if (Navigation.getTopmostReportId() === prevOnyxReportID) { | ||
Navigation.setShouldPopAllStateOnUP(); | ||
Navigation.goBack(ROUTES.HOME, false, true); | ||
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. Additionally, if we only move the logic to go back to parent report as I mentioned in my proposal, on native when we go to thread report from parent, leave room, and click on back button, the parent report will appear again. So I added the logic to push |
||
} | ||
if (prevReport.parentReportID) { | ||
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(prevReport.parentReportID)); | ||
return; | ||
} | ||
Report.navigateToConciergeChat(); | ||
return; | ||
} | ||
|
@@ -329,7 +337,7 @@ function ReportScreen({ | |
|
||
fetchReportIfNeeded(); | ||
ComposerActions.setShouldShowComposeInput(true); | ||
}, [route, report, errors, fetchReportIfNeeded, prevReport.reportID, prevUserLeavingStatus, userLeavingStatus, prevReport.statusNum]); | ||
}, [route, report, errors, fetchReportIfNeeded, prevReport.reportID, prevUserLeavingStatus, userLeavingStatus, prevReport.statusNum, prevReport.parentReportID]); | ||
|
||
useEffect(() => { | ||
// Ensures subscription event succeeds when the report/workspace room is created optimistically. | ||
|
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.
@eVoloshchak We added the logic to go to concierge chat in
ReportScreen
recently. So I move all the navigate logic fromleaveRoom
function intoReportScreen
.