mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
also unset room vm if moving away from room
This commit is contained in:
parent
379d65edf1
commit
a360d0a2b9
@ -142,6 +142,13 @@ export class SessionViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
_openRoom(roomId) {
|
||||
if (!roomId) {
|
||||
if (this._currentRoomViewModel) {
|
||||
this._currentRoomViewModel = this.disposeTracked(this._currentRoomViewModel);
|
||||
this.emitChange("currentRoom");
|
||||
}
|
||||
return;
|
||||
}
|
||||
// already open?
|
||||
if (this._currentRoomViewModel?.id === roomId) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user