Fix unread notification count

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-05-03 17:15:01 +02:00
parent a64bd537f4
commit 4b3cc9e67b
2 changed files with 6 additions and 2 deletions

View File

@ -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: {