From b6175714813f5b93a422458f4bc468e4d871af62 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 17 Mar 2016 11:56:46 +0000 Subject: [PATCH] tidy up https://github.com/matrix-org/matrix-react-sdk/pull/225 --- src/components/views/rooms/EventTile.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 8187e55fd6..cfff797e7d 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -268,6 +268,13 @@ module.exports = React.createClass({ this.readAvatarNode = ReactDom.findDOMNode(node); }, + onMemberAvatarClicked: function(sender) { + dispatcher.dispatch({ + action: 'view_user', + member: sender + }); + }, + render: function() { var MessageTimestamp = sdk.getComponent('messages.MessageTimestamp'); var SenderProfile = sdk.getComponent('messages.SenderProfile'); @@ -305,23 +312,13 @@ module.exports = React.createClass({ var readAvatars = this.getReadAvatars(); - function onMemberAvatarClicked(sender) { - return () => { - //var member = new Matrix.RoomMember(null, userId); - //if (!member) { return; } - dispatcher.dispatch({ - action: 'view_user', - member: sender - }); - }; - } - var avatar, sender; if (!this.props.continuation) { if (this.props.mxEvent.sender) { avatar = ( -
- +
+
); }