fix: sorting of reblogs and favourites in grouped notifications

zio/stable
patak 2022-12-27 21:49:04 +01:00
parent 5c4cd7e992
commit 6388b5287c
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ function groupItems(items: Notification[]): NotificationSlot[] {
}
like[notification.type === 'reblog' ? 'reblog' : 'favourite'] = notification
}
likes.sort((a, b) => b.reblog && !a.reblog ? 1 : -1)
likes.sort((a, b) => a.reblog ? !b.reblog || (a.favourite && !b.favourite) ? -1 : 0 : 0)
results.push({
id: `grouped-${id++}`,
type: 'grouped-reblogs-and-favourites',