Skip to content

Commit

Permalink
Merge pull request Expensify#32159 from dukenv0307/fix/30062
Browse files Browse the repository at this point in the history
Apply the logic of navigating to Concierge only to the policyRoom chatType
  • Loading branch information
MariaHCD authored Dec 4, 2023
2 parents 7fef24c + 5fdabd0 commit 9dbf39d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function ReportScreen({
prevOnyxReportID === routeReportID &&
!onyxReportID &&
prevReport.statusNum === CONST.REPORT.STATUS.OPEN &&
(report.statusNum === CONST.REPORT.STATUS.CLOSED || (!report.statusNum && !prevReport.parentReportID)))
(report.statusNum === CONST.REPORT.STATUS.CLOSED || (!report.statusNum && !prevReport.parentReportID && prevReport.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ROOM)))
) {
Navigation.dismissModal();
if (Navigation.getTopmostReportId() === prevOnyxReportID) {
Expand All @@ -339,7 +339,7 @@ function ReportScreen({

fetchReportIfNeeded();
ComposerActions.setShouldShowComposeInput(true);
}, [route, report, errors, fetchReportIfNeeded, prevReport.reportID, prevUserLeavingStatus, userLeavingStatus, prevReport.statusNum, prevReport.parentReportID]);
}, [route, report, errors, fetchReportIfNeeded, prevReport.reportID, prevUserLeavingStatus, userLeavingStatus, prevReport.statusNum, prevReport.parentReportID, prevReport.chatType]);

useEffect(() => {
if (!ReportUtils.isValidReportIDFromPath(reportID)) {
Expand Down

0 comments on commit 9dbf39d

Please sign in to comment.