mirror of https://github.com/vector-im/riot-web
Fix SpaceRoomView member list back button not working
parent
870f40575c
commit
7836de77d0
|
@ -36,7 +36,6 @@ import { inviteMultipleToRoom, showRoomInviteDialog } from "../../RoomInvite";
|
||||||
import { UIComponent } from "../../settings/UIFeature";
|
import { UIComponent } from "../../settings/UIFeature";
|
||||||
import { UPDATE_EVENT } from "../../stores/AsyncStore";
|
import { UPDATE_EVENT } from "../../stores/AsyncStore";
|
||||||
import RightPanelStore from "../../stores/right-panel/RightPanelStore";
|
import RightPanelStore from "../../stores/right-panel/RightPanelStore";
|
||||||
import { IRightPanelCard } from "../../stores/right-panel/RightPanelStoreIPanelState";
|
|
||||||
import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases";
|
import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases";
|
||||||
import ResizeNotifier from "../../utils/ResizeNotifier";
|
import ResizeNotifier from "../../utils/ResizeNotifier";
|
||||||
import {
|
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.action !== "view_3pid_invite") return;
|
||||||
|
|
||||||
if (payload.action === Action.ViewUser && payload.member) {
|
/**
|
||||||
const spaceMemberInfoCard: IRightPanelCard = {
|
* The rest of the `ViewUser` and `view_3pid_invite` exists in the `<RoomView />`
|
||||||
phase: RightPanelPhases.SpaceMemberInfo,
|
* component. This deals specifically with showing the space members list
|
||||||
state: { spaceId: this.props.space.roomId, member: payload.member },
|
*/
|
||||||
};
|
if (!payload.member && !payload.event) {
|
||||||
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 {
|
|
||||||
RightPanelStore.instance.setCard({
|
RightPanelStore.instance.setCard({
|
||||||
phase: RightPanelPhases.SpaceMemberList,
|
phase: RightPanelPhases.SpaceMemberList,
|
||||||
state: { spaceId: this.props.space.roomId },
|
state: { spaceId: this.props.space.roomId },
|
||||||
|
|
Loading…
Reference in New Issue