From 2dcec6343d0cc6d6de8496c623b0ed25a2acb82e Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 27 May 2021 23:57:28 +0530 Subject: [PATCH] Info icon should open/close view alternatively Signed-off-by: RMidhunSuresh --- src/domain/session/room/RoomViewModel.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/domain/session/room/RoomViewModel.js b/src/domain/session/room/RoomViewModel.js index 20ba8034..00008039 100644 --- a/src/domain/session/room/RoomViewModel.js +++ b/src/domain/session/room/RoomViewModel.js @@ -287,6 +287,13 @@ export class RoomViewModel extends ViewModel { console.error(err.stack); } } + + toggleDetailsPanel() { + const isPanelOpen = !!this.navigation.path.get("details"); + const link = isPanelOpen ? this.urlCreator.urlUntilSegment("room"): + this.urlCreator.urlForSegment("details"); + window.location.href = link; + } get composerViewModel() { return this._composerVM;