mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
anticipate non-found rooms
This commit is contained in:
parent
081820d8fb
commit
afbfb0c82c
@ -132,7 +132,10 @@ export class RoomGridViewModel extends ViewModel {
|
||||
this._viewModels[i] = this.disposeTracked(vm);
|
||||
}
|
||||
if (newId) {
|
||||
this._viewModels[i] = this.track(this._createRoomViewModel(newId));
|
||||
const newVM = this._createRoomViewModel(newId);
|
||||
if (newVM) {
|
||||
this._viewModels[i] = this.track(newVM);
|
||||
}
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
|
@ -122,7 +122,10 @@ export class SessionViewModel extends ViewModel {
|
||||
if (vm) {
|
||||
this._currentRoomViewModel = this.track(vm);
|
||||
} else {
|
||||
this._currentRoomViewModel = this.track(this._createRoomViewModel(currentRoomId.value));
|
||||
const newVM = this._createRoomViewModel(currentRoomId.value);
|
||||
if (newVM) {
|
||||
this._currentRoomViewModel = this.track(newVM);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._gridViewModel = this.disposeTracked(this._gridViewModel);
|
||||
|
Loading…
Reference in New Issue
Block a user