Skip to content

Commit 8ad1d91

Browse files
authored
Merge pull request Expensify#67760 from huult/65642-thread-back-navigation
2 parents 1ee8054 + 97cc956 commit 8ad1d91

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/libs/actions/Report.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3510,6 +3510,16 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>) {
35103510

35113511
if (lastAccessedReportID) {
35123512
const lastAccessedReportRoute = ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID);
3513+
const isChatThread = isChatThreadReportUtils(currentReport);
3514+
3515+
if (isChatThread) {
3516+
// Using requestAnimationFrame to wait for RHP modal dismissal before navigating, avoiding navigation stack issues on web/desktop.
3517+
requestAnimationFrame(() => {
3518+
Navigation.navigate(lastAccessedReportRoute);
3519+
});
3520+
return;
3521+
}
3522+
35133523
Navigation.goBack(lastAccessedReportRoute);
35143524
} else {
35153525
const isChatThread = isChatThreadReportUtils(currentReport);

0 commit comments

Comments
 (0)