From e68ada95a2f8ada20699d56385ea53e0040b7a73 Mon Sep 17 00:00:00 2001 From: sabrina-kiam <109105561+sabrina-kiam@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:24:10 -0400 Subject: [PATCH] [PLAT-834]: Fix notifications last seen new tag (#3143) --- .../common/src/services/audius-backend/AudiusBackend.ts | 2 +- packages/web/src/components/nav/desktop/NavColumn.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/common/src/services/audius-backend/AudiusBackend.ts b/packages/common/src/services/audius-backend/AudiusBackend.ts index cf48287d9a8..db6c92ab68d 100644 --- a/packages/common/src/services/audius-backend/AudiusBackend.ts +++ b/packages/common/src/services/audius-backend/AudiusBackend.ts @@ -2094,7 +2094,7 @@ export const audiusBackend = ({ return { groupId: notification.group_id, timestamp, - isViewed: notification.seen_at == null, + isViewed: !!notification.seen_at, id: `timestamp:${timestamp}:group_id:${notification.group_id}` } } diff --git a/packages/web/src/components/nav/desktop/NavColumn.tsx b/packages/web/src/components/nav/desktop/NavColumn.tsx index 8fcf7023042..6c97b916fae 100644 --- a/packages/web/src/components/nav/desktop/NavColumn.tsx +++ b/packages/web/src/components/nav/desktop/NavColumn.tsx @@ -166,9 +166,9 @@ const NavColumn = ({ record(make(Name.NOTIFICATIONS_OPEN, { source: 'button' })) } else { closeNotificationPanel() - } - if (notificationCount > 0) { - markAllNotificationsAsViewed() + if (notificationCount > 0) { + markAllNotificationsAsViewed() + } } }, [ notificationPanelIsOpen,