From 2f57d0a5bd607e1c8018936a7aaca4c69c42321a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 11 May 2024 09:23:58 +0200 Subject: [PATCH] Fix notification marker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/actions/notifications.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/notifications.ts b/src/actions/notifications.ts index b269efe3c9..b4e7effc4c 100644 --- a/src/actions/notifications.ts +++ b/src/actions/notifications.ts @@ -372,12 +372,12 @@ const markReadNotifications = () => if (!isLoggedIn(getState)) return; const state = getState(); - const topNotificationId = state.notifications.items.first()?.id; - let lastReadId = state.notifications.lastRead; + let topNotificationId = state.notifications.items.first()?.id; + const lastReadId = state.notifications.lastRead; const v = parseVersion(state.instance.version); - if (typeof lastReadId === 'string' && lastReadId?.includes('+')) { - lastReadId = lastReadId.split('+')[0]; + if (typeof topNotificationId === 'string' && topNotificationId?.includes('+')) { + topNotificationId = topNotificationId.split('+')[0]; } if (topNotificationId && (lastReadId === -1 || compareId(topNotificationId, lastReadId) > 0)) {