mirror of https://github.com/vector-im/riot-web
Only aggregate DM notifications on the Space Panel in the Home Space
parent
feac025f6f
commit
48237949ad
|
@ -406,7 +406,19 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
|
|
||||||
this.spaceFilteredRooms.forEach((roomIds, s) => {
|
this.spaceFilteredRooms.forEach((roomIds, s) => {
|
||||||
// Update NotificationStates
|
// Update NotificationStates
|
||||||
this.getNotificationState(s)?.setRooms(visibleRooms.filter(room => roomIds.has(room.roomId)));
|
this.getNotificationState(s)?.setRooms(visibleRooms.filter(room => {
|
||||||
|
if (roomIds.has(room.roomId)) {
|
||||||
|
// Don't aggregate notifications for DMs except in the Home Space
|
||||||
|
if (s !== HOME_SPACE) {
|
||||||
|
return !DMRoomMap.shared().getUserIdForRoomId(room.roomId)
|
||||||
|
|| RoomListStore.instance.getTagsForRoom(room).includes(DefaultTagID.Favourite);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
}, 100, {trailing: true, leading: true});
|
}, 100, {trailing: true, leading: true});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue