forked from mystiq/hydrogen-web
Modify open-room action to fix bug
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
1e05d41294
commit
7e177f6953
2 changed files with 10 additions and 6 deletions
|
@ -132,12 +132,15 @@ export function parseUrlPath(urlPath, currentNavPath, defaultSessionId) {
|
|||
segments.push(roomsSegmentWithRoom(rooms, roomId, currentNavPath));
|
||||
}
|
||||
segments.push(new Segment("room", roomId));
|
||||
// Add right-panel segments from previous path
|
||||
if (!urlPath.includes("/member/")) {
|
||||
// Add right-panel segments from previous path if /member is not in url
|
||||
// fixes memberlist -> member details closing/opening grid view
|
||||
const previousSegments = currentNavPath.segments;
|
||||
const i = previousSegments.findIndex(s => s.type === "right-panel");
|
||||
if (i !== -1) {
|
||||
segments.push(...previousSegments.slice(i));
|
||||
}
|
||||
}
|
||||
} else if (type === "last-session") {
|
||||
let sessionSegment = currentNavPath.get("session");
|
||||
if (typeof sessionSegment?.value !== "string" && defaultSessionId) {
|
||||
|
|
|
@ -47,7 +47,8 @@ export class MemberTileViewModel extends ViewModel {
|
|||
}
|
||||
|
||||
get detailsUrl() {
|
||||
return `${this.urlCreator.urlUntilSegment("room")}/member/${this._member.userId}`;
|
||||
const roomId = this.navigation.path.get("room").value;
|
||||
return `${this.urlCreator.openRoomActionUrl(roomId)}/member/${this._member.userId}`;
|
||||
}
|
||||
|
||||
_updatePreviousName(newName) {
|
||||
|
|
Loading…
Reference in a new issue