Mute all updates from rooms that are invisible

This commit is contained in:
Travis Ralston 2020-11-25 20:03:58 -07:00
parent b9af446c1b
commit 80b93e0843

View file

@ -402,6 +402,10 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
} }
private async handleRoomUpdate(room: Room, cause: RoomUpdateCause): Promise<any> { private async handleRoomUpdate(room: Room, cause: RoomUpdateCause): Promise<any> {
if (!VisibilityProvider.instance.isRoomVisible(room)) {
return; // don't do anything on rooms that aren't visible
}
const shouldUpdate = await this.algorithm.handleRoomUpdate(room, cause); const shouldUpdate = await this.algorithm.handleRoomUpdate(room, cause);
if (shouldUpdate) { if (shouldUpdate) {
if (SettingsStore.getValue("advancedRoomListLogging")) { if (SettingsStore.getValue("advancedRoomListLogging")) {