Fix space member list opening with back button (#7773)

This commit is contained in:
Charlie Calendre 2022-02-10 10:20:48 +01:00 committed by GitHub
parent 8103e606c4
commit 871032e1bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -372,12 +372,14 @@ export default class RightPanelStore extends ReadyWatchingStore {
SettingsStore.getValue("feature_right_panel_default_open") && SettingsStore.getValue("feature_right_panel_default_open") &&
!this.byRoom[this.viewedRoomId]?.isOpen !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] = { this.byRoom[this.viewedRoomId] = {
isOpen: true, isOpen: true,
history: [ history,
{ phase: RightPanelPhases.RoomSummary },
{ phase: RightPanelPhases.RoomMemberList },
],
}; };
} }
this.emitAndUpdateSettings(); this.emitAndUpdateSettings();