forked from mystiq/hydrogen-web
Make check more generic
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
parent
2ceaebbd1f
commit
f841efeef4
1 changed files with 4 additions and 2 deletions
|
@ -132,8 +132,10 @@ export function parseUrlPath(urlPath, currentNavPath, defaultSessionId) {
|
||||||
segments.push(roomsSegmentWithRoom(rooms, roomId, currentNavPath));
|
segments.push(roomsSegmentWithRoom(rooms, roomId, currentNavPath));
|
||||||
}
|
}
|
||||||
segments.push(new Segment("room", roomId));
|
segments.push(new Segment("room", roomId));
|
||||||
if (!urlPath.includes("/member/")) {
|
const partIndex = parts.findIndex(part => part === "open-room");
|
||||||
// Add right-panel segments from previous path if /member is not in url
|
const partsAfterRoom = parts.slice(partIndex + 1);
|
||||||
|
if (partsAfterRoom.length === 1) {
|
||||||
|
// Copy right-panel segments from previous path only if there are no other parts after open-room
|
||||||
// fixes memberlist -> member details closing/opening grid view
|
// fixes memberlist -> member details closing/opening grid view
|
||||||
const previousSegments = currentNavPath.segments;
|
const previousSegments = currentNavPath.segments;
|
||||||
const i = previousSegments.findIndex(s => s.type === "right-panel");
|
const i = previousSegments.findIndex(s => s.type === "right-panel");
|
||||||
|
|
Loading…
Reference in a new issue