Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
tidy up #225
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed Mar 17, 2016
1 parent e03d862 commit b617571
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/components/views/rooms/EventTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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 = (
<div className="mx_EventTile_avatar" style={{cursor: "pointer"}}>

This comment has been minimized.

Copy link
@aviraldg

aviraldg Mar 17, 2016

Contributor

Did we lose the cursor: pointer here? (or is that something that should go into vector-web?)

This comment has been minimized.

Copy link
@ara4n

ara4n via email Mar 17, 2016

Author Member

This comment has been minimized.

Copy link
@aviraldg

aviraldg Mar 17, 2016

Contributor

Right, so all styling should go to the theme/skin (which is vector-web.) Still, shouldn't we have some reasonable defaults in here (not talking about this issue specifically)?

This comment has been minimized.

Copy link
@ara4n

ara4n via email Mar 17, 2016

Author Member
<MemberAvatar member={this.props.mxEvent.sender} width={24} height={24} onClick={onMemberAvatarClicked(this.props.mxEvent.sender)} />
<div className="mx_EventTile_avatar">
<MemberAvatar member={this.props.mxEvent.sender} width={24} height={24}
onClick={ this.onMemberAvatarClicked.bind(this, this.props.mxEvent.sender) } />
</div>
);
}
Expand Down

0 comments on commit b617571

Please sign in to comment.