Instead of listening for view_room, use a callback

But make sure that nothing other than the callback is done when RoomTile is clicked.
This commit is contained in:
Luke Barnard 2017-03-06 17:44:29 +00:00
parent 20fa36325f
commit bf348a0f78
3 changed files with 22 additions and 22 deletions

View file

@ -553,6 +553,13 @@ module.exports = WithMatrixClient(React.createClass({
Modal.createDialog(ImageView, params, "mx_Dialog_lightbox");
},
onRoomTileClick(roomId) {
dis.dispatch({
action: 'view_room',
room_id: roomId,
});
},
_renderDevices: function() {
if (!this._enableDevices) {
return null;
@ -613,6 +620,7 @@ module.exports = WithMatrixClient(React.createClass({
unread={Unread.doesRoomHaveUnreadMessages(room)}
highlight={highlight}
isInvite={me.membership == "invite"}
onClick={this.onRoomTileClick}
/>
);
}