From 90d31601cb5cff83a6558eda5fb7eae3b1166d78 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Tue, 23 Jul 2024 14:39:44 +0500 Subject: [PATCH] fix: mark archived reports as read --- src/pages/home/report/ReportActionsList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index f93798b16b28..fa5a06f618df 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -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() );