mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Merge pull request #5875 from matrix-org/dbkr/dont_include_invisible_rooms_in_notif_summary
Don't include invisible rooms in notify summary
This commit is contained in:
commit
249a0faa76
@ -22,6 +22,7 @@ import { FetchRoomFn, ListNotificationState } from "./ListNotificationState";
|
|||||||
import { Room } from "matrix-js-sdk/src/models/room";
|
import { Room } from "matrix-js-sdk/src/models/room";
|
||||||
import { RoomNotificationState } from "./RoomNotificationState";
|
import { RoomNotificationState } from "./RoomNotificationState";
|
||||||
import { SummarizedNotificationState } from "./SummarizedNotificationState";
|
import { SummarizedNotificationState } from "./SummarizedNotificationState";
|
||||||
|
import { VisibilityProvider } from "../room-list/filters/VisibilityProvider";
|
||||||
|
|
||||||
interface IState {}
|
interface IState {}
|
||||||
|
|
||||||
@ -47,7 +48,9 @@ export class RoomNotificationStateStore extends AsyncStoreWithClient<IState> {
|
|||||||
// This will include highlights from the previous version of the room internally
|
// This will include highlights from the previous version of the room internally
|
||||||
const globalState = new SummarizedNotificationState();
|
const globalState = new SummarizedNotificationState();
|
||||||
for (const room of this.matrixClient.getVisibleRooms()) {
|
for (const room of this.matrixClient.getVisibleRooms()) {
|
||||||
globalState.add(this.getRoomState(room));
|
if (VisibilityProvider.instance.isRoomVisible(room)) {
|
||||||
|
globalState.add(this.getRoomState(room));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return globalState;
|
return globalState;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user