mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-26 11:38:37 +00:00
Pass a client into RoomNotifs.getRoomNotifsState (#9631)
Pass an explicit client into `RoomNotifs.getRoomNotifsState`, rather than relying on `MatrixClientPeg`. This resolves a race condition where we have a component which thinks it is using a particular component, but `MatrixClientPeg` has been updated.
This commit is contained in:
committed by
GitHub
parent
8bd60d09dc
commit
f642765149
@@ -55,7 +55,7 @@ export const useUnreadNotifications = (room: Room, threadId?: string): {
|
||||
setSymbol("!");
|
||||
setCount(1);
|
||||
setColor(NotificationColor.Red);
|
||||
} else if (getRoomNotifsState(room.roomId) === RoomNotifState.Mute) {
|
||||
} else if (getRoomNotifsState(room.client, room.roomId) === RoomNotifState.Mute) {
|
||||
setSymbol(null);
|
||||
setCount(0);
|
||||
setColor(NotificationColor.None);
|
||||
|
||||
Reference in New Issue
Block a user