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);
|
this._viewModels[i] = this.disposeTracked(vm);
|
||||||
}
|
}
|
||||||
if (newId) {
|
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;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,10 @@ export class SessionViewModel extends ViewModel {
|
|||||||
if (vm) {
|
if (vm) {
|
||||||
this._currentRoomViewModel = this.track(vm);
|
this._currentRoomViewModel = this.track(vm);
|
||||||
} else {
|
} 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);
|
this._gridViewModel = this.disposeTracked(this._gridViewModel);
|
||||||
|
Loading…
Reference in New Issue
Block a user