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,11 +132,14 @@ 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
|
||||
const previousSegments = currentNavPath.segments;
|
||||
const i = previousSegments.findIndex(s => s.type === "right-panel");
|
||||
if (i !== -1) {
|
||||
segments.push(...previousSegments.slice(i));
|
||||
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");
|
||||
|
|
|
@ -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) {
|
||||
|
|
Reference in a new issue