Skip to content

Commit

Permalink
Merge pull request #29961 from tienifr/fix/29552
Browse files Browse the repository at this point in the history
Fix: 29552 IOU - The message "Only visible to you" does not disappear when editing details
  • Loading branch information
Gonals authored Oct 25, 2023
2 parents 2e36e8c + df2fe84 commit 2ce45e3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,8 @@ function editMoneyRequest(transactionID, transactionThreadReportID, transactionC
optimisticPolicyRecentlyUsedTags[tagListName] = [transactionChanges.tag, ...uniquePolicyRecentlyUsedTags];
}

const isScanning = TransactionUtils.hasReceipt(updatedTransaction) && TransactionUtils.isReceiptBeingScanned(updatedTransaction);

// STEP 4: Compose the optimistic data
const currentTime = DateUtils.getDBTime();
const optimisticData = [
Expand Down Expand Up @@ -1842,6 +1844,28 @@ function editMoneyRequest(transactionID, transactionThreadReportID, transactionC
lastVisibleActionCreated: currentTime,
},
},
...(!isScanning
? [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport.reportID}`,
value: {
[transactionThread.parentReportActionID]: {
whisperedToAccountIDs: [],
},
},
},
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport.parentReportID}`,
value: {
[iouReport.parentReportActionID]: {
whisperedToAccountIDs: [],
},
},
},
]
: []),
];

if (!_.isEmpty(optimisticPolicyRecentlyUsedTags)) {
Expand Down

0 comments on commit 2ce45e3

Please sign in to comment.