1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-15 05:19:58 +00:00

fix(ui): Avoid duplicate IDs for grouped notifications (#3014)

This commit is contained in:
Wladimir Palant 2024-10-26 05:37:40 +02:00 committed by GitHub
parent c153f719fe
commit 49a5f49966
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 = () => {