Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix space member list opening with back button (#7773)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cal authored Feb 10, 2022
1 parent 8103e60 commit 871032e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/stores/right-panel/RightPanelStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,14 @@ export default class RightPanelStore extends ReadyWatchingStore {
SettingsStore.getValue("feature_right_panel_default_open") &&
!this.byRoom[this.viewedRoomId]?.isOpen
) {
const history = [{ phase: RightPanelPhases.RoomMemberList }];
const room = this.viewedRoomId && this.mxClient?.getRoom(this.viewedRoomId);
if (!room?.isSpaceRoom()) {
history.unshift({ phase: RightPanelPhases.RoomSummary });
}
this.byRoom[this.viewedRoomId] = {
isOpen: true,
history: [
{ phase: RightPanelPhases.RoomSummary },
{ phase: RightPanelPhases.RoomMemberList },
],
history,
};
}
this.emitAndUpdateSettings();
Expand Down

0 comments on commit 871032e

Please sign in to comment.