forked from mystiq/hydrogen-web
also unset room vm if moving away from room
This commit is contained in:
parent
379d65edf1
commit
a360d0a2b9
1 changed files with 7 additions and 0 deletions
|
@ -142,6 +142,13 @@ export class SessionViewModel extends ViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
_openRoom(roomId) {
|
_openRoom(roomId) {
|
||||||
|
if (!roomId) {
|
||||||
|
if (this._currentRoomViewModel) {
|
||||||
|
this._currentRoomViewModel = this.disposeTracked(this._currentRoomViewModel);
|
||||||
|
this.emitChange("currentRoom");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
// already open?
|
// already open?
|
||||||
if (this._currentRoomViewModel?.id === roomId) {
|
if (this._currentRoomViewModel?.id === roomId) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue