From 597433d549a5fbcc59cfd1ee7d067c78e29daf34 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 15 Sep 2019 21:25:36 +0100 Subject: [PATCH 1/2] Reuse showRoom for onJoinClick so we join using alias if its available Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RoomDirectory.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 7085461633..e3ba8f969f 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -391,12 +391,7 @@ module.exports = React.createClass({ onJoinClick: function(ev, room) { this.props.onFinished(); - MatrixClientPeg.get().joinRoom(room.room_id); - dis.dispatch({ - action: 'view_room', - room_id: room.room_id, - joining: true, - }); + this.showRoom(room, null, true); ev.stopPropagation(); }, From 5d1056e1ef2f97e9e86f383174f32f9f3e221739 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 15 Sep 2019 21:30:01 +0100 Subject: [PATCH 2/2] don't fire onFinished twice Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RoomDirectory.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index e3ba8f969f..332ea5e731 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -390,7 +390,6 @@ module.exports = React.createClass({ }, onJoinClick: function(ev, room) { - this.props.onFinished(); this.showRoom(room, null, true); ev.stopPropagation(); },