avoid using roomviewstore for detecting selected room

This commit is contained in:
Bruno Windels 2018-11-07 16:29:17 +01:00
parent 78d5d7ac0c
commit 720bc11aa4
2 changed files with 5 additions and 2 deletions

View file

@ -35,6 +35,10 @@ class ActiveRoomObserver {
this._roomStoreToken = OpenRoomsStore.addListener(this._onOpenRoomsStoreUpdate.bind(this));
}
getActiveRoomId() {
return this._activeRoomId;
}
addListener(roomId, listener) {
if (!this._listeners[roomId]) this._listeners[roomId] = [];
this._listeners[roomId].push(listener);