From a5001e50aa45439aec777b5d92e8590d70ea036d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 2 Jul 2020 13:33:24 -0600 Subject: [PATCH] Disable all unread decorations on muted rooms --- src/stores/notifications/RoomNotificationState.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/stores/notifications/RoomNotificationState.ts b/src/stores/notifications/RoomNotificationState.ts index b9bc3f3492..a73c503453 100644 --- a/src/stores/notifications/RoomNotificationState.ts +++ b/src/stores/notifications/RoomNotificationState.ts @@ -81,7 +81,12 @@ export class RoomNotificationState extends EventEmitter implements IDestroyable, private updateNotificationState() { const before = {count: this.count, symbol: this.symbol, color: this.color}; - if (this.roomIsInvite) { + if (RoomNotifs.getRoomNotifsState(this.room.roomId) === RoomNotifs.MUTE) { + // When muted we suppress all notification states, even if we have context on them. + this._color = NotificationColor.None; + this._symbol = null; + this._count = 0; + } else if (this.roomIsInvite) { this._color = NotificationColor.Red; this._symbol = "!"; this._count = 1; // not used, technically