mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-14 21:09:58 +00:00
fix(ui): Avoid duplicate IDs for grouped notifications (#3014)
This commit is contained in:
parent
c153f719fe
commit
49a5f49966
1 changed files with 2 additions and 1 deletions
|
@ -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 = () => {
|
||||
|
|
Loading…
Reference in a new issue