mirror of
https://github.com/elk-zone/elk
synced 2024-11-30 15:58:06 +09:00
fix(ui): Avoid duplicate IDs for grouped notifications (#3014)
This commit is contained in:
parent
c153f719fe
commit
49a5f49966
@ -15,6 +15,8 @@ const groupCapacity = Number.MAX_VALUE // No limit
|
|||||||
|
|
||||||
const includeNotificationTypes: mastodon.v1.NotificationType[] = ['update', 'mention', 'poll', 'status']
|
const includeNotificationTypes: mastodon.v1.NotificationType[] = ['update', 'mention', 'poll', 'status']
|
||||||
|
|
||||||
|
let id = 0
|
||||||
|
|
||||||
function includeNotificationsForStatusCard({ type, status }: mastodon.v1.Notification) {
|
function includeNotificationsForStatusCard({ type, status }: mastodon.v1.Notification) {
|
||||||
// Exclude update, mention, pool and status notifications without the status entry:
|
// Exclude update, mention, pool and status notifications without the status entry:
|
||||||
// no makes sense to include them
|
// no makes sense to include them
|
||||||
@ -44,7 +46,6 @@ function hasHeader(account: mastodon.v1.Account) {
|
|||||||
function groupItems(items: mastodon.v1.Notification[]): NotificationSlot[] {
|
function groupItems(items: mastodon.v1.Notification[]): NotificationSlot[] {
|
||||||
const results: NotificationSlot[] = []
|
const results: NotificationSlot[] = []
|
||||||
|
|
||||||
let id = 0
|
|
||||||
let currentGroupId = ''
|
let currentGroupId = ''
|
||||||
let currentGroup: mastodon.v1.Notification[] = []
|
let currentGroup: mastodon.v1.Notification[] = []
|
||||||
const processGroup = () => {
|
const processGroup = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user