mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Accommodate "rightpanel" navigation segment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
8b01ca502e
commit
dfe7385611
@ -83,6 +83,7 @@ export class RoomGridViewModel extends ViewModel {
|
||||
let path = this.navigation.path.until("rooms");
|
||||
path = path.with(this.navigation.segment("room", roomId));
|
||||
if (detailsShown) {
|
||||
path = path.with(this.navigation.segment("rightpanel", true));
|
||||
path = path.with(this.navigation.segment("details", true));
|
||||
}
|
||||
this.navigation.applyPath(path);
|
||||
|
@ -93,8 +93,13 @@ export class LeftPanelViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
_pathForDetails(path) {
|
||||
let _path = path;
|
||||
const details = this.navigation.path.get("details");
|
||||
return details?.value ? path.with(details) : path;
|
||||
if (details?.value) {
|
||||
_path = _path.with(this.navigation.segment("rightpanel"));
|
||||
_path = _path.with(details)
|
||||
}
|
||||
return _path;
|
||||
}
|
||||
|
||||
toggleGrid() {
|
||||
|
@ -290,6 +290,7 @@ export class RoomViewModel extends ViewModel {
|
||||
|
||||
openDetailsPanel() {
|
||||
let path = this.navigation.path.until("room");
|
||||
path = path.with(this.navigation.segment("rightpanel", true));
|
||||
path = path.with(this.navigation.segment("details", true));
|
||||
this.navigation.applyPath(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user