mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Make check more generic
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
parent
2ceaebbd1f
commit
f841efeef4
@ -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 New Issue
Block a user