Skip to content

Commit 3d67234

Browse files
author
Luke Barnard
committed
view_room dispatch from onClick RoomTile
So that RoomTile does less, and if other things should happen onClick, they happen in the same place as the `view_room` for clarity.
1 parent c6da4d9 commit 3d67234

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎src/components/structures/RoomSubList.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ var RoomSubList = React.createClass({
146146
}
147147
},
148148

149+
onRoomTileClick(roomId) {
150+
dis.dispatch({
151+
action: 'view_room',
152+
room_id: roomId,
153+
});
154+
},
155+
149156
tsOfNewestEvent: function(room) {
150157
for (var i = room.timeline.length - 1; i >= 0; --i) {
151158
var ev = room.timeline[i];
@@ -364,7 +371,9 @@ var RoomSubList = React.createClass({
364371
highlight={ room.getUnreadNotificationCount('highlight') > 0 || self.props.label === 'Invites' }
365372
isInvite={ self.props.label === 'Invites' }
366373
refreshSubList={ self._updateSubListCount }
367-
incomingCall={ null } />
374+
incomingCall={ null }
375+
onClick={ self.onRoomTileClick }
376+
/>
368377
);
369378
});
370379
},

0 commit comments

Comments
 (0)