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 ContextualMenu = require('../../../ContextualMenu');
|
||||||
var Velociraptor = require('../../../Velociraptor');
|
var Velociraptor = require('../../../Velociraptor');
|
||||||
require('../../../VelocityBounce');
|
require('../../../VelocityBounce');
|
||||||
|
var dispatcher = require("../../../dispatcher");
|
||||||
|
|
||||||
var bounce = false;
|
var bounce = false;
|
||||||
try {
|
try {
|
||||||
|
@ -304,12 +305,23 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
var readAvatars = this.getReadAvatars();
|
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;
|
var avatar, sender;
|
||||||
if (!this.props.continuation) {
|
if (!this.props.continuation) {
|
||||||
if (this.props.mxEvent.sender) {
|
if (this.props.mxEvent.sender) {
|
||||||
avatar = (
|
avatar = (
|
||||||
<div className="mx_EventTile_avatar">
|
<div className="mx_EventTile_avatar" style={{cursor: "pointer"}}>
|
||||||
<MemberAvatar member={this.props.mxEvent.sender} width={24} height={24} />
|
<MemberAvatar member={this.props.mxEvent.sender} width={24} height={24} onClick={onMemberAvatarClicked(this.props.mxEvent.sender)} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue