mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +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) {
|
_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 New Issue
Block a user