Fix duplicate accounts in a group

Renaud Chaput 2024-06-18 11:07:01 +02:00
parent c14e537ef0
commit 0f9bfb342c
No known key found for this signature in database
GPG Key ID: BCFC859D49B46990
1 changed files with 5 additions and 1 deletions

View File

@ -133,7 +133,11 @@ export const notificationsGroupsReducer =
if (existingGroupIndex > -1) {
const existingGroup = state.groups[existingGroupIndex];
if (existingGroup && existingGroup.type !== 'gap') {
if (
existingGroup &&
existingGroup.type !== 'gap' &&
!existingGroup.sampleAccountsIds.includes(notification.account.id) // This can happen for example if you like, then unlike, then like again the same post
) {
// Update the existing group
if (
existingGroup.sampleAccountsIds.unshift(notification.account.id) >