From bd7f56007ab2a1e2e0e3b21b92da3d934fea3ac2 Mon Sep 17 00:00:00 2001 From: Aviral Dasgupta Date: Thu, 17 Mar 2016 02:45:38 +0530 Subject: [PATCH] Bring up MemberInfo on avatar click in EventTile Fixes vector-im/vector-web#1174 --- src/components/views/rooms/EventTile.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index c9e74f521f..8187e55fd6 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -27,6 +27,7 @@ var TextForEvent = require('../../../TextForEvent'); var ContextualMenu = require('../../../ContextualMenu'); var Velociraptor = require('../../../Velociraptor'); require('../../../VelocityBounce'); +var dispatcher = require("../../../dispatcher"); var bounce = false; try { @@ -304,12 +305,23 @@ 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 = ( -
- +
+
); }