Skip to content
Merged
Show file tree
Hide file tree
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: 0 additions & 9 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,6 @@ function getSortedReportActions(reportActions: ReportAction[] | null, shouldSort
return sortedActions;
}

/**
* Returns filtered list for one transaction view as we don't want to display IOU action type in the one-transaction view
* Separated it from getCombinedReportActions, so it can be reused
*/
function getFilteredForOneTransactionView(reportActions: ReportAction[]): ReportAction[] {
return reportActions.filter((action) => !isSentMoneyReportAction(action));
}

/**
* Returns a sorted and filtered list of report actions from a report and it's associated child
* transaction thread report in order to correctly display reportActions from both reports in the one-transaction report view.
Expand Down Expand Up @@ -1598,7 +1590,6 @@ export {
getAllReportActions,
getCombinedReportActions,
getDismissedViolationMessageText,
getFilteredForOneTransactionView,
getFirstVisibleReportActionID,
getIOUActionForReportID,
getIOUReportIDFromReportActionPreview,
Expand Down
3 changes: 1 addition & 2 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ function ReportActionsView({
createdAction.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE;
}

// moneyRequestActions.length === 1 indicates that we have one-transaction report and we don't want to display additonal IOU action
return moneyRequestActions.length === 1 ? ReportActionsUtils.getFilteredForOneTransactionView([...actions, createdAction]) : [...actions, createdAction];
return [...actions, createdAction];
}, [allReportActions, report, transactionThreadReport]);

// Get a sorted array of reportActions for both the current report and the transaction thread report associated with this report (if there is one)
Expand Down