From a1d3db76e54b126260b534a95a8ee5a0c21a107a Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 9 Aug 2016 23:57:36 +0100 Subject: [PATCH] Hack around a react warning when login completes, we replace the whole state, which means we unset collapse_lhs, which then leads to complaints from the RoomList. I think the 'default view' for MatrixChat ought to be factored out to another component, which could manage collapse_lhs properly; but for now, hack around it. --- src/components/structures/MatrixChat.js | 2 +- src/components/views/rooms/RoomList.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 33e6499e21..55d9a06998 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1093,7 +1093,7 @@ module.exports = React.createClass({
{topBar}
- +
{page_element}
diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 8e57ceab9b..8967bdeafb 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -33,7 +33,7 @@ module.exports = React.createClass({ propTypes: { ConferenceHandler: React.PropTypes.any, - collapsed: React.PropTypes.bool, + collapsed: React.PropTypes.bool.isRequired, currentRoom: React.PropTypes.string, searchFilter: React.PropTypes.string, },