Check value of details everywhere

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-06-04 14:27:43 +05:30
parent b2448e1207
commit 5b74038912
3 changed files with 3 additions and 3 deletions

View file

@ -84,7 +84,7 @@ export class RoomGridViewModel extends ViewModel {
}
const vmo = this._viewModelsObservables[index];
if (vmo) {
const detailsShown = !!this.navigation.path.get("details");
const detailsShown = !!this.navigation.path.get("details")?.value;
this.navigation.push("room", vmo.id);
if (detailsShown) {
this.navigation.push("details", true);

View file

@ -260,7 +260,7 @@ export class SessionViewModel extends ViewModel {
_toggleRoomInformationPanel() {
this._roomInfoViewModel = this.disposeTracked(this._roomInfoViewModel);
const room = this._roomFromNavigation();
const enable = !!this.navigation.path.get("details");
const enable = !!this.navigation.path.get("details")?.value;
if (enable) {
this._roomInfoViewModel = this.track(new RoomInfoViewModel(this.childOptions({ room })));
}

View file

@ -94,7 +94,7 @@ export class LeftPanelViewModel extends ViewModel {
_pathForDetails(path) {
const details = this.navigation.path.get("details");
return details ? path.with(details) : path;
return details?.value ? path.with(details) : path;
}
toggleGrid() {