Update suggested room on join

pull/21833/head
Michael Telatynski 2021-03-09 13:41:37 +00:00
parent cf2c790699
commit 1cfeb36927
1 changed files with 6 additions and 0 deletions

View File

@ -355,6 +355,12 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
// this.onRoomUpdate(room);
this.onRoomsUpdate();
}
const numSuggestedRooms = this._suggestedRooms.length;
this._suggestedRooms = this._suggestedRooms.filter(r => r.room_id !== room.roomId);
if (numSuggestedRooms !== this._suggestedRooms.length) {
this.emit(SUGGESTED_ROOMS, this._suggestedRooms);
}
};
private onRoomState = (ev: MatrixEvent) => {