Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3499,7 +3499,16 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>) {
const lastAccessedReportID = findLastAccessedReport(false, false, undefined, currentReport?.reportID)?.reportID;

if (lastAccessedReportID) {
const isChatThread = isChatThreadReportUtils(currentReport);
const lastAccessedReportRoute = ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID);
if (isChatThread) {
// Using requestAnimationFrame to wait for RHP modal dismissal before navigating, avoiding navigation stack issues on web/desktop.
requestAnimationFrame(() => {
Navigation.navigate(lastAccessedReportRoute);
});
return;
}

Navigation.goBack(lastAccessedReportRoute);
} else {
const isChatThread = isChatThreadReportUtils(currentReport);
Expand Down