Skip to content

Commit

Permalink
Merge pull request #3421 from parasharrajat/edited
Browse files Browse the repository at this point in the history
fixed edited flag is shown for brief moment
  • Loading branch information
Jag96 authored Jun 8, 2021
2 parents 6835401 + acf77af commit 9054dc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@ NetworkConnection.onReconnect(fetchAllReports);
* @param {String} htmlForNewComment
*/
function editReportComment(reportID, originalReportAction, htmlForNewComment) {
// Skip the Edit if message is not changed
if (originalReportAction.message[0].html === htmlForNewComment.trim()) {
return;
}

// Optimistically update the report action with the new message
const sequenceNumber = originalReportAction.sequenceNumber;
const newReportAction = {...originalReportAction};
Expand Down

0 comments on commit 9054dc3

Please sign in to comment.