mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
Merge pull request #4938 from matrix-org/travis/room-list/badge-fix
Don't destroy room notification states when replacing them
This commit is contained in:
commit
cd0106964f
@ -55,11 +55,6 @@ export class ListNotificationState extends NotificationState {
|
||||
for (const newRoom of diff.added) {
|
||||
const state = this.getRoomFn(newRoom);
|
||||
state.on(NOTIFICATION_STATE_UPDATE, this.onRoomNotificationStateUpdate);
|
||||
if (this.states[newRoom.roomId]) {
|
||||
// "Should never happen" disclaimer.
|
||||
console.warn("Overwriting notification state for room:", newRoom.roomId);
|
||||
this.states[newRoom.roomId].destroy();
|
||||
}
|
||||
this.states[newRoom.roomId] = state;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user