Skip to content

Commit

Permalink
Merge pull request #49096 from Expensify/revert-48055-fix/45576
Browse files Browse the repository at this point in the history
Revert "fix: remove transaction after navigate"

(cherry picked from commit fae105b)

(CP triggered by luacmartins)
  • Loading branch information
luacmartins authored and OSBotify committed Sep 12, 2024
1 parent 2c38ee8 commit 9294302
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8180,6 +8180,5 @@ export {
updateMoneyRequestTaxAmount,
updateMoneyRequestTaxRate,
mergeDuplicates,
prepareToCleanUpMoneyRequest,
};
export type {GPSPoint as GpsPoint, IOURequestType};
9 changes: 1 addition & 8 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
if (ReportActionsUtils.isTrackExpenseAction(requestParentReportAction)) {
navigateBackToAfterDelete.current = IOU.deleteTrackExpense(moneyRequestReport?.reportID ?? '', iouTransactionID, requestParentReportAction, isSingleTransactionView);
} else {
const {urlToNavigateBack} = IOU.prepareToCleanUpMoneyRequest(iouTransactionID, requestParentReportAction, true);
navigateBackToAfterDelete.current = urlToNavigateBack;
navigateBackToAfterDelete.current = IOU.deleteMoneyRequest(iouTransactionID, requestParentReportAction, isSingleTransactionView);
}

isTransactionDeleted.current = true;
Expand Down Expand Up @@ -814,12 +813,6 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
Navigation.dismissModal();
} else {
ReportUtils.navigateBackAfterDeleteTransaction(navigateBackToAfterDelete.current, true);
if (!requestParentReportAction) {
return;
}
setTimeout(() => {
IOU.deleteMoneyRequest(iouTransactionID, requestParentReportAction, isSingleTransactionView);
}, CONST.ANIMATED_TRANSITION);
}
}}
prompt={caseID === CASES.DEFAULT ? translate('task.deleteConfirmation') : translate('iou.deleteConfirmation')}
Expand Down

0 comments on commit 9294302

Please sign in to comment.