Merge pull request #225 from aviraldg/fix-1174
Bring up MemberInfo on avatar click in EventTile
This commit is contained in:
commit
e03d8626be
1 changed files with 14 additions and 2 deletions
|
@ -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 = (
|
||||
<div className="mx_EventTile_avatar">
|
||||
<MemberAvatar member={this.props.mxEvent.sender} width={24} height={24} />
|
||||
<div className="mx_EventTile_avatar" style={{cursor: "pointer"}}>
|
||||
<MemberAvatar member={this.props.mxEvent.sender} width={24} height={24} onClick={onMemberAvatarClicked(this.props.mxEvent.sender)} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue