Skip to content
Merged
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
12 changes: 12 additions & 0 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4913,6 +4913,18 @@ function deleteAppReport(reportID: string | undefined) {
value: {[unreportedAction.reportActionID]: unreportedAction},
});

successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${childReportID}`,
value: {[unreportedAction.reportActionID]: {pendingAction: null}},
});
Comment on lines +4916 to +4920

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add failureData to clear the unreportedAction

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s77rt updated


failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${childReportID}`,
value: {[unreportedAction.reportActionID]: null},
});

if (transactionID) {
transactionIDToReportActionAndThreadData[transactionID] = {
moneyRequestPreviewReportActionID: newReportActionID,
Expand Down