Fix default thread notification of the new RoomHeader (#12194)

This commit is contained in:
Florian Duros 2024-01-31 17:24:56 +01:00 committed by GitHub
parent a5f9df5855
commit a3a387a1dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View file

@ -44,9 +44,12 @@ export const useRoomThreadNotifications = (room: Room): NotificationLevel => {
// If the current thread has unread messages, we're done.
if (doesRoomOrThreadHaveUnreadMessages(thread)) {
setNotificationLevel(NotificationLevel.Activity);
break;
return;
}
}
// default case
setNotificationLevel(NotificationLevel.None);
}, [room]);
useEventEmitter(room, RoomEvent.UnreadNotifications, updateNotification);