From a734fb9d35a5750c47ce7c7352378d6dd83304f7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 17 Dec 2018 15:55:26 +0100 Subject: [PATCH] dont set initial phase, show panel when collapsed --- src/components/structures/GroupView.js | 2 +- src/components/views/right_panel/HeaderButtons.js | 4 ++-- src/components/views/rooms/RoomHeader.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 3f20a6da98..d77837ad63 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -1311,7 +1311,7 @@ export default React.createClass({
{ rightButtons }
- + diff --git a/src/components/views/right_panel/HeaderButtons.js b/src/components/views/right_panel/HeaderButtons.js index 16f7f006f8..e0448c0ae2 100644 --- a/src/components/views/right_panel/HeaderButtons.js +++ b/src/components/views/right_panel/HeaderButtons.js @@ -25,7 +25,7 @@ export default class HeaderButtons extends React.Component { super(props); this.state = { - phase: initialPhase, + phase: props.collapsedRhs ? null : initialPhase, isUserPrivilegedInGroup: null, }; this.onAction = this.onAction.bind(this); @@ -58,7 +58,7 @@ export default class HeaderButtons extends React.Component { phase: null, }); } else { - if (!this.state.phase) { + if (this.props.collapsedRhs) { dis.dispatch({ action: 'show_right_panel', }); diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index e92d1499aa..8aea31f9ed 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -424,7 +424,7 @@ module.exports = React.createClass({ { saveButton } { cancelButton } { rightRow } - + );