Skip to content

Commit

Permalink
don't display report as one-transaction report if it has previously d…
Browse files Browse the repository at this point in the history
…eleted IOU requests
  • Loading branch information
NikkiWines committed Apr 4, 2024
1 parent 853f71b commit f9d5eaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ function getOneTransactionThreadReportID(reportActions: OnyxEntry<ReportActions>
action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU &&
(iouRequestTypes.includes(action.originalMessage.type) ?? []) &&
action.childReportID &&
action.originalMessage.IOUTransactionID,
// Include deleted IOU reportActions because they might have associated comments that we'd want to display
(action.originalMessage.deleted || action.originalMessage.IOUTransactionID),
);

// If we don't have any IOU request actions, or we have more than one IOU request actions, this isn't a oneTransaction report
Expand Down
1 change: 1 addition & 0 deletions src/types/onyx/OriginalMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type IOUMessage = {
type: ValueOf<typeof CONST.IOU.REPORT_ACTION_TYPE>;
cancellationReason?: string;
paymentType?: PaymentMethodType;
deleted?: string;
/** Only exists when we are sending money */
IOUDetails?: IOUDetails;
};
Expand Down

0 comments on commit f9d5eaa

Please sign in to comment.