forked from mystiq/hydrogen-web
Check value of details everywhere
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
b2448e1207
commit
5b74038912
3 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ export class RoomGridViewModel extends ViewModel {
|
||||||
}
|
}
|
||||||
const vmo = this._viewModelsObservables[index];
|
const vmo = this._viewModelsObservables[index];
|
||||||
if (vmo) {
|
if (vmo) {
|
||||||
const detailsShown = !!this.navigation.path.get("details");
|
const detailsShown = !!this.navigation.path.get("details")?.value;
|
||||||
this.navigation.push("room", vmo.id);
|
this.navigation.push("room", vmo.id);
|
||||||
if (detailsShown) {
|
if (detailsShown) {
|
||||||
this.navigation.push("details", true);
|
this.navigation.push("details", true);
|
||||||
|
|
|
@ -260,7 +260,7 @@ export class SessionViewModel extends ViewModel {
|
||||||
_toggleRoomInformationPanel() {
|
_toggleRoomInformationPanel() {
|
||||||
this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel);
|
this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel);
|
||||||
const room = this._roomFromNavigation();
|
const room = this._roomFromNavigation();
|
||||||
const enable = !!this.navigation.path.get("details");
|
const enable = !!this.navigation.path.get("details")?.value;
|
||||||
if (enable) {
|
if (enable) {
|
||||||
this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room })));
|
this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room })));
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ export class LeftPanelViewModel extends ViewModel {
|
||||||
|
|
||||||
_pathForDetails(path) {
|
_pathForDetails(path) {
|
||||||
const details = this.navigation.path.get("details");
|
const details = this.navigation.path.get("details");
|
||||||
return details ? path.with(details) : path;
|
return details?.value ? path.with(details) : path;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleGrid() {
|
toggleGrid() {
|
||||||
|
|
Loading…
Reference in a new issue