Don't destroy room notification states when replacing them

The "should never happen" now happens a lot by design. We shouldn't destroy the state as it'll stop badge counts for everything.

Fixes https://github.com/vector-im/riot-web/issues/14391
pull/21833/head
Travis Ralston 2020-07-09 10:22:04 -06:00
parent d94b6e2b36
commit ae09bfb8fd
1 changed files with 0 additions and 5 deletions

View File

@ -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;
}