From dc31bf4d6b384ae1f16add734c0074b53c30c770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Sat, 14 Jun 2025 15:19:48 +0200 Subject: [PATCH] pl-fe: fix notification count on mastodon i forgot this software exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-fe/src/reducers/notifications.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/reducers/notifications.ts b/packages/pl-fe/src/reducers/notifications.ts index 1b56a8d05..a85c3f6ff 100644 --- a/packages/pl-fe/src/reducers/notifications.ts +++ b/packages/pl-fe/src/reducers/notifications.ts @@ -53,8 +53,8 @@ const comparator = (a: Pick, b // Count how many notifications appear after the given ID (for unread count) const countFuture = (notifications: Array, lastId: string | number) => notifications.reduce((acc, notification) => { - const length = Math.max(notification.group_key.length, lastId.toString().length); - if (notification.group_key.padStart(length, '0').localeCompare(lastId.toString().padStart(length, '0')) === 1) { + const length = Math.max(notification.most_recent_notification_id.length, lastId.toString().length); + if (notification.most_recent_notification_id.padStart(length, '0').localeCompare(lastId.toString().padStart(length, '0')) === 1) { return acc + 1; } else { return acc;