mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Remove array from logic
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
parent
4f4bc8f805
commit
df74d0c814
@ -132,9 +132,9 @@ 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));
|
||||||
const partIndex = parts.findIndex(part => part === "open-room");
|
const openRoomPartIndex = parts.findIndex(part => part === "open-room");
|
||||||
const partsAfterRoom = parts.slice(partIndex + 1);
|
const hasOnlyRoomIdAfterPart = openRoomPartIndex >= parts.length - 2;
|
||||||
if (partsAfterRoom.length === 1) {
|
if (hasOnlyRoomIdAfterPart) {
|
||||||
// Copy right-panel segments from previous path only if there are no other parts after open-room
|
// 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;
|
||||||
|
Loading…
Reference in New Issue
Block a user