diff --git a/src/actions/notifications.ts b/src/actions/notifications.ts index f0ae162c8..b269efe3c 100644 --- a/src/actions/notifications.ts +++ b/src/actions/notifications.ts @@ -373,9 +373,13 @@ const markReadNotifications = () => const state = getState(); const topNotificationId = state.notifications.items.first()?.id; - const lastReadId = state.notifications.lastRead; + let lastReadId = state.notifications.lastRead; const v = parseVersion(state.instance.version); + if (typeof lastReadId === 'string' && lastReadId?.includes('+')) { + lastReadId = lastReadId.split('+')[0]; + } + if (topNotificationId && (lastReadId === -1 || compareId(topNotificationId, lastReadId) > 0)) { const marker = { notifications: { diff --git a/src/reducers/notifications.ts b/src/reducers/notifications.ts index da5f7d11e..b2512c683 100644 --- a/src/reducers/notifications.ts +++ b/src/reducers/notifications.ts @@ -107,7 +107,7 @@ const isValid = (notification: APIEntity) => { // Count how many notifications appear after the given ID (for unread count) const countFuture = (notifications: ImmutableOrderedMap, lastId: string | number) => { return notifications.reduce((acc, notification) => { - if (parseId(notification.get('id')) > parseId(lastId)) { + if (parseId(notification.get('id').split('+')[0]) > parseId(lastId)) { return acc + 1; } else { return acc;