From ff00474aa533e46973737ede88a6d77d68e53d4c Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 16 Sep 2016 02:37:06 +0100 Subject: [PATCH] show RightPanel when people click on users --- src/components/structures/MatrixChat.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 346ceefc89..096080d30e 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -323,6 +323,20 @@ module.exports = React.createClass({ } }); break; + case 'view_user': + // FIXME: ugly hack to expand the RightPanel and then re-dispatch. + if (this.state.collapse_rhs) { + setTimeout(()=>{ + dis.dispatch({ + action: 'show_right_panel', + }); + dis.dispatch({ + action: 'view_user', + member: payload.member, + }); + }, 0); + } + break; case 'view_room': // Takes either a room ID or room alias: if switching to a room the client is already // known to be in (eg. user clicks on a room in the recents panel), supply the ID