From 28326dd88e90270dcaa86a6f3149ef141286b006 Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:00:38 +0100 Subject: [PATCH 1/2] add additional check for unread workspace utils --- src/libs/WorkspacesSettingsUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/WorkspacesSettingsUtils.ts b/src/libs/WorkspacesSettingsUtils.ts index a3a3d85419e2..5ff1963913c1 100644 --- a/src/libs/WorkspacesSettingsUtils.ts +++ b/src/libs/WorkspacesSettingsUtils.ts @@ -189,7 +189,7 @@ function getWorkspacesUnreadStatuses(): Record { return; } - workspacesUnreadStatuses[policyID] = ReportUtils.isUnread(report); + workspacesUnreadStatuses[policyID] = ReportUtils.isUnread(report) && !!report.lastActorAccountID; }); return workspacesUnreadStatuses; From 22f97e4139877ad0c5b1f89d88e82e3ddb76ced0 Mon Sep 17 00:00:00 2001 From: cdOut <88325488+cdOut@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:22:44 +0100 Subject: [PATCH 2/2] add clarifying comment --- src/libs/WorkspacesSettingsUtils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/WorkspacesSettingsUtils.ts b/src/libs/WorkspacesSettingsUtils.ts index 5ff1963913c1..7e9a6f91b413 100644 --- a/src/libs/WorkspacesSettingsUtils.ts +++ b/src/libs/WorkspacesSettingsUtils.ts @@ -189,6 +189,8 @@ function getWorkspacesUnreadStatuses(): Record { return; } + // When the only message of a report is deleted lastVisibileActionCreated is not reset leading to wrongly + // setting it Unread so we add additional condition here to avoid read workspace indicator from being bold. workspacesUnreadStatuses[policyID] = ReportUtils.isUnread(report) && !!report.lastActorAccountID; });