Skip to content

Commit

Permalink
Merge pull request #4059 from Expensify/joe-report-action-count
Browse files Browse the repository at this point in the history
[CP Staging] Don't show all chats in LHN in #focus mode
  • Loading branch information
marcaaron authored Jul 15, 2021
2 parents 5a8eff8 + b26d6d2 commit 951308f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@ function getUnreadActionCount(report) {
// Save the lastReadActionID locally so we can access this later
lastReadSequenceNumbers[report.reportID] = lastReadSequenceNumber;

if (report.reportActionListLength === 0) {
if (report.reportActionCount === 0) {
return 0;
}

if (!lastReadSequenceNumber) {
return report.reportActionListLength;
return report.reportActionCount;
}

// There are unread items if the last one the user has read is less
// than the highest sequence number we have
const unreadActionCount = report.reportActionListLength - lastReadSequenceNumber;
const unreadActionCount = report.reportActionCount - lastReadSequenceNumber;
return Math.max(0, unreadActionCount);
}

Expand Down

0 comments on commit 951308f

Please sign in to comment.