Skip to content

Commit

Permalink
fix: mark archived reports as read
Browse files Browse the repository at this point in the history
  • Loading branch information
hurali97 committed Jul 23, 2024
1 parent 04d5b67 commit 90d3160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ function ReportActionsList({
const areSomeReportActionsUnread = sortedVisibleReportActions.some((reportAction) => {
/**
* The archived reports should not be marked as unread. So we are checking if the report is archived or not.
* If the report is archived and unread, we will mark the report as read.
* If the report is archived, we will mark the report as read.
*/
const isUnreadArchivedReport = ReportUtils.isArchivedRoom(report) && ReportUtils.isUnread(report);
const isUnread = isUnreadArchivedReport || (newMessageTimeReference && newMessageTimeReference < reportAction.created);
const isArchivedReport = ReportUtils.isArchivedRoom(report);
const isUnread = isArchivedReport || (newMessageTimeReference && newMessageTimeReference < reportAction.created);
return (
isUnread && (ReportActionsUtils.isReportPreviewAction(reportAction) ? reportAction.childLastActorAccountID : reportAction.actorAccountID) !== Report.getCurrentUserAccountID()
);
Expand Down

0 comments on commit 90d3160

Please sign in to comment.