Fix notification marker
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
001234dae1
commit
2f57d0a5bd
1 changed files with 4 additions and 4 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue