Fix incorrect function call into RightPanelStore

We dispatch to open, not call directly into the store.
This commit is contained in:
Travis Ralston 2019-12-06 14:52:31 -07:00
parent 4bcf99f65e
commit 78ce801c25

View file

@ -67,7 +67,7 @@ export default class RightPanel extends React.Component {
const rps = RightPanelStore.getSharedInstance(); const rps = RightPanelStore.getSharedInstance();
if (this.props.groupId) { if (this.props.groupId) {
if (!RIGHT_PANEL_PHASES_NO_ARGS.includes(rps.groupPanelPhase)) { if (!RIGHT_PANEL_PHASES_NO_ARGS.includes(rps.groupPanelPhase)) {
rps.setPhase(RIGHT_PANEL_PHASES.GroupMemberList); dis.dispatch({action: "set_right_panel_phase", phase: RIGHT_PANEL_PHASES.GroupMemberList});
return RIGHT_PANEL_PHASES.GroupMemberList; return RIGHT_PANEL_PHASES.GroupMemberList;
} }
return rps.groupPanelPhase; return rps.groupPanelPhase;
@ -75,7 +75,7 @@ export default class RightPanel extends React.Component {
return RIGHT_PANEL_PHASES.RoomMemberInfo; return RIGHT_PANEL_PHASES.RoomMemberInfo;
} else { } else {
if (!RIGHT_PANEL_PHASES_NO_ARGS.includes(rps.roomPanelPhase)) { if (!RIGHT_PANEL_PHASES_NO_ARGS.includes(rps.roomPanelPhase)) {
rps.setPhase(RIGHT_PANEL_PHASES.RoomMemberList); dis.dispatch({action: "set_right_panel_phase", phase: RIGHT_PANEL_PHASES.RoomMemberList});
return RIGHT_PANEL_PHASES.RoomMemberList; return RIGHT_PANEL_PHASES.RoomMemberList;
} }
return rps.roomPanelPhase; return rps.roomPanelPhase;