From 49a5f499660b09ab3df28c52f337b5178a3506a5 Mon Sep 17 00:00:00 2001 From: Wladimir Palant <374261+palant@users.noreply.github.com> Date: Sat, 26 Oct 2024 05:37:40 +0200 Subject: [PATCH] fix(ui): Avoid duplicate IDs for grouped notifications (#3014) --- components/notification/NotificationPaginator.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/notification/NotificationPaginator.vue b/components/notification/NotificationPaginator.vue index 3e2a2ac8..6ec7120e 100644 --- a/components/notification/NotificationPaginator.vue +++ b/components/notification/NotificationPaginator.vue @@ -15,6 +15,8 @@ const groupCapacity = Number.MAX_VALUE // No limit const includeNotificationTypes: mastodon.v1.NotificationType[] = ['update', 'mention', 'poll', 'status'] +let id = 0 + function includeNotificationsForStatusCard({ type, status }: mastodon.v1.Notification) { // Exclude update, mention, pool and status notifications without the status entry: // no makes sense to include them @@ -44,7 +46,6 @@ function hasHeader(account: mastodon.v1.Account) { function groupItems(items: mastodon.v1.Notification[]): NotificationSlot[] { const results: NotificationSlot[] = [] - let id = 0 let currentGroupId = '' let currentGroup: mastodon.v1.Notification[] = [] const processGroup = () => {