From 8228a7d48551adbd5431338672b9a5847252ee90 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 11 Oct 2015 13:49:44 +0100 Subject: [PATCH] track whether the LHS is collapsed. (shouldn't this be vector specific too?) --- src/controllers/pages/MatrixChat.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/controllers/pages/MatrixChat.js b/src/controllers/pages/MatrixChat.js index d1e289c9cc..a530a3b4cf 100644 --- a/src/controllers/pages/MatrixChat.js +++ b/src/controllers/pages/MatrixChat.js @@ -38,6 +38,7 @@ module.exports = { getInitialState: function() { var s = { logged_in: !!(MatrixClientPeg.get() && MatrixClientPeg.get().credentials), + collapse_lhs: false, ready: false, }; if (s.logged_in) { @@ -210,6 +211,16 @@ module.exports = { case 'notifier_enabled': this.forceUpdate(); break; + case 'hide_left_panel': + this.setState({ + collapse_lhs: true, + }); + break; + case 'show_left_panel': + this.setState({ + collapse_lhs: false, + }); + break; } },