Fix error on room leave

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-01-09 10:29:06 +05:30
parent ca3cced6ad
commit 34bb5f9928
2 changed files with 24 additions and 22 deletions

View file

@ -73,6 +73,8 @@ class Navigation extends EventEmitter {
this.emit(cons.events.navigation.SPACE_SELECTED, this.selectedSpaceId);
},
[cons.actions.navigation.SELECT_ROOM]: () => {
if (this.selectedRoomId === action.roomId) return;
const prevSelectedRoomId = this.selectedRoomId;
this.selectedRoomId = action.roomId;
this.removeRecentRoom(prevSelectedRoomId);