diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js
index d1622e5f41..1adc31649e 100644
--- a/src/components/structures/RightPanel.js
+++ b/src/components/structures/RightPanel.js
@@ -69,45 +69,21 @@ module.exports = React.createClass({
},
onMemberListButtonClick: function() {
- if (this.props.collapsed || this.state.phase !== this.Phase.MemberList) {
- this.setState({ phase: this.Phase.MemberList });
- dis.dispatch({
- action: 'show_right_panel',
- });
- }
- else {
- dis.dispatch({
- action: 'hide_right_panel',
- });
- }
+ this.setState({ phase: this.Phase.MemberList });
},
onFileListButtonClick: function() {
- if (this.props.collapsed || this.state.phase !== this.Phase.FilePanel) {
- this.setState({ phase: this.Phase.FilePanel });
- dis.dispatch({
- action: 'show_right_panel',
- });
- }
- else {
- dis.dispatch({
- action: 'hide_right_panel',
- });
- }
+ this.setState({ phase: this.Phase.FilePanel });
},
onNotificationListButtonClick: function() {
- if (this.props.collapsed || this.state.phase !== this.Phase.NotificationPanel) {
- this.setState({ phase: this.Phase.NotificationPanel });
- dis.dispatch({
- action: 'show_right_panel',
- });
- }
- else {
- dis.dispatch({
- action: 'hide_right_panel',
- });
- }
+ this.setState({ phase: this.Phase.NotificationPanel });
+ },
+
+ onCollapseClick: function() {
+ dis.dispatch({
+ action: 'hide_right_panel',
+ });
},
onInviteButtonClick: function() {
@@ -235,6 +211,9 @@ module.exports = React.createClass({