diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 73e3e8ecdd..76a6076892 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -45,8 +45,6 @@ export default class RightPanel extends React.Component { }; } - static Phase = RIGHT_PANEL_PHASES; - constructor(props, context) { super(props, context); this.state = { @@ -66,11 +64,11 @@ export default class RightPanel extends React.Component { _getPhaseFromProps() { if (this.props.groupId) { - return RightPanel.Phase.GroupMemberList; + return RIGHT_PANEL_PHASES.GroupMemberList; } else if (this.props.user) { - return RightPanel.Phase.RoomMemberInfo; + return RIGHT_PANEL_PHASES.RoomMemberInfo; } else { - return RightPanel.Phase.RoomMemberList; + return RIGHT_PANEL_PHASES.RoomMemberList; } } @@ -117,7 +115,7 @@ export default class RightPanel extends React.Component { onInviteToGroupButtonClick() { showGroupInviteDialog(this.props.groupId).then(() => { this.setState({ - phase: RightPanel.Phase.GroupMemberList, + phase: RIGHT_PANEL_PHASES.GroupMemberList, }); }); } @@ -133,9 +131,9 @@ export default class RightPanel extends React.Component { return; } // redraw the badge on the membership list - if (this.state.phase === RightPanel.Phase.RoomMemberList && member.roomId === this.props.roomId) { + if (this.state.phase === RIGHT_PANEL_PHASES.RoomMemberList && member.roomId === this.props.roomId) { this._delayedUpdate(); - } else if (this.state.phase === RightPanel.Phase.RoomMemberInfo && member.roomId === this.props.roomId && + } else if (this.state.phase === RIGHT_PANEL_PHASES.RoomMemberInfo && member.roomId === this.props.roomId && member.userId === this.state.member.userId) { // refresh the member info (e.g. new power level) this._delayedUpdate(); @@ -169,13 +167,13 @@ export default class RightPanel extends React.Component { let panel =
; - if (this.props.roomId && this.state.phase === RightPanel.Phase.RoomMemberList) { + if (this.props.roomId && this.state.phase === RIGHT_PANEL_PHASES.RoomMemberList) { panel =