Skip to content

Commit f0fe54a

Browse files
committed
update code
1 parent a71dbd9 commit f0fe54a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/libs/actions/IOU.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7951,10 +7951,10 @@ function getNavigationUrlOnMoneyRequestDelete(transactionID: string | undefined,
79517951
return undefined;
79527952
}
79537953

7954-
const {shouldDeleteIOUReport, iouReport} = prepareToCleanUpMoneyRequest(transactionID, reportAction);
7954+
const {shouldDeleteTransactionThread, shouldDeleteIOUReport, iouReport} = prepareToCleanUpMoneyRequest(transactionID, reportAction);
79557955

79567956
// Determine which report to navigate back to
7957-
if (iouReport && isSingleTransactionView && !shouldDeleteIOUReport) {
7957+
if (iouReport && isSingleTransactionView && shouldDeleteTransactionThread && !shouldDeleteIOUReport) {
79587958
return ROUTES.REPORT_WITH_ID.getRoute(iouReport.reportID);
79597959
}
79607960

@@ -7991,10 +7991,9 @@ function getNavigationUrlAfterTrackExpenseDelete(
79917991
}
79927992

79937993
const transactionThreadID = reportAction.childReportID;
7994-
const shouldDeleteTransactionThread = transactionThreadID ? (reportAction?.childVisibleActionCount ?? 0) === 0 : false;
79957994

79967995
// Only navigate if in single transaction view and the thread will be deleted
7997-
if (isSingleTransactionView && shouldDeleteTransactionThread && chatReport?.reportID) {
7996+
if (isSingleTransactionView && chatReport?.reportID) {
79987997
// Pop the deleted report screen before navigating. This prevents navigating to the Concierge chat due to the missing report.
79997998
return ROUTES.REPORT_WITH_ID.getRoute(chatReport.reportID);
80007999
}

0 commit comments

Comments
 (0)