Fix SpaceRoomView member list back button not working

pull/28217/head
Germain 2023-08-31 13:46:22 +01:00
parent 870f40575c
commit 7836de77d0
1 changed files with 5 additions and 20 deletions

View File

@ -36,7 +36,6 @@ import { inviteMultipleToRoom, showRoomInviteDialog } from "../../RoomInvite";
import { UIComponent } from "../../settings/UIFeature";
import { UPDATE_EVENT } from "../../stores/AsyncStore";
import RightPanelStore from "../../stores/right-panel/RightPanelStore";
import { IRightPanelCard } from "../../stores/right-panel/RightPanelStoreIPanelState";
import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases";
import ResizeNotifier from "../../utils/ResizeNotifier";
import {
@ -672,25 +671,11 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
if (payload.action !== Action.ViewUser && payload.action !== "view_3pid_invite") return;
if (payload.action === Action.ViewUser && payload.member) {
const spaceMemberInfoCard: IRightPanelCard = {
phase: RightPanelPhases.SpaceMemberInfo,
state: { spaceId: this.props.space.roomId, member: payload.member },
};
if (payload.push) {
RightPanelStore.instance.pushCard(spaceMemberInfoCard);
} else {
RightPanelStore.instance.setCards([
{ phase: RightPanelPhases.SpaceMemberList, state: { spaceId: this.props.space.roomId } },
spaceMemberInfoCard,
]);
}
} else if (payload.action === "view_3pid_invite" && payload.event) {
RightPanelStore.instance.setCard({
phase: RightPanelPhases.Space3pidMemberInfo,
state: { spaceId: this.props.space.roomId, memberInfoEvent: payload.event },
});
} else {
/**
* The rest of the `ViewUser` and `view_3pid_invite` exists in the `<RoomView />`
* component. This deals specifically with showing the space members list
*/
if (!payload.member && !payload.event) {
RightPanelStore.instance.setCard({
phase: RightPanelPhases.SpaceMemberList,
state: { spaceId: this.props.space.roomId },