From 918d8278a87ebe46cd52a1a4affa4690a945cbe7 Mon Sep 17 00:00:00 2001 From: Rohit Verma Date: Mon, 12 May 2025 20:57:28 +0530 Subject: [PATCH 1/2] fix: consistent unread marker on chat after creating new report action --- src/pages/home/report/ReportActionsList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 5eb0306a3b7c..10e44ee8a602 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -29,6 +29,7 @@ import { isConsecutiveActionMadeByPreviousActor, isConsecutiveChronosAutomaticTimerAction, isDeletedParentAction, + isReportActionUnread, isReportPreviewAction, isReversedTransaction, isTransactionThread, @@ -349,7 +350,7 @@ function ReportActionsList({ return; } - if (isUnread(report, transactionThreadReport)) { + if (isUnread(report, transactionThreadReport) || isReportActionUnread(lastAction, unreadMarkerTime)) { // On desktop, when the notification center is displayed, isVisible will return false. // Currently, there's no programmatic way to dismiss the notification center panel. // To handle this, we use the 'referrer' parameter to check if the current navigation is triggered from a notification. From c1b5e11a9154421b0a3544f21fe073be7cbc7406 Mon Sep 17 00:00:00 2001 From: Rohit Verma Date: Tue, 13 May 2025 16:23:48 +0530 Subject: [PATCH 2/2] fix: use isCurrentActionUnread to check if last action is unread --- src/pages/home/report/ReportActionsList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 10e44ee8a602..83b8fdbf1868 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -28,8 +28,8 @@ import { getFirstVisibleReportActionID, isConsecutiveActionMadeByPreviousActor, isConsecutiveChronosAutomaticTimerAction, + isCurrentActionUnread, isDeletedParentAction, - isReportActionUnread, isReportPreviewAction, isReversedTransaction, isTransactionThread, @@ -350,7 +350,7 @@ function ReportActionsList({ return; } - if (isUnread(report, transactionThreadReport) || isReportActionUnread(lastAction, unreadMarkerTime)) { + if (isUnread(report, transactionThreadReport) || (lastAction && isCurrentActionUnread(report, lastAction))) { // On desktop, when the notification center is displayed, isVisible will return false. // Currently, there's no programmatic way to dismiss the notification center panel. // To handle this, we use the 'referrer' parameter to check if the current navigation is triggered from a notification.