diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index b7f52429555d..b82d0ad9ca16 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1132,6 +1132,11 @@ function updateLastReadActionID(reportID, sequenceNumber) { // action). If 1 isn't subtracted then the "New" marker appears one row below the action (the first unread action) const lastReadSequenceNumber = (sequenceNumber - 1) || reportMaxSequenceNumbers[reportID]; + // We call this method in many cases where there's nothing to update because we already updated it, so we avoid + // doing an unnecessary server call if the last read is the same one we had already + if (lastReadSequenceNumbers[reportID] === lastReadSequenceNumber) { + return; + } setLocalLastRead(reportID, lastReadSequenceNumber); // Mark the report as not having any unread items