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)) {