This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import { arrayDiff } from "../../utils/arrays";
21
21
import { RoomNotificationState } from "./RoomNotificationState" ;
22
22
import { NotificationState , NotificationStateEvents } from "./NotificationState" ;
23
23
import { FetchRoomFn } from "./ListNotificationState" ;
24
+ import { DefaultTagID } from "../room-list/models" ;
25
+ import RoomListStore from "../room-list/RoomListStore" ;
24
26
25
27
export class SpaceNotificationState extends NotificationState {
26
28
public rooms : Room [ ] = [ ] ; // exposed only for tests
@@ -74,7 +76,15 @@ export class SpaceNotificationState extends NotificationState {
74
76
75
77
this . _count = 0 ;
76
78
this . _color = NotificationColor . None ;
77
- for ( const state of Object . values ( this . states ) ) {
79
+ for ( const [ roomId , state ] of Object . entries ( this . states ) ) {
80
+ const roomTags = RoomListStore . instance . getTagsForRoom ( this . rooms . find ( r => r . roomId === roomId ) ) ;
81
+
82
+ // We ignore unreads in LowPriority rooms, see https://github.com/vector-im/element-web/issues/16836
83
+ if (
84
+ roomTags . includes ( DefaultTagID . LowPriority ) &&
85
+ state . color === NotificationColor . Bold
86
+ ) continue ;
87
+
78
88
this . _count += state . count ;
79
89
this . _color = Math . max ( this . color , state . color ) ;
80
90
}
You can’t perform that action at this time.
0 commit comments