This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
src/components/views/rooms Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,13 @@ module.exports = React.createClass({
268
268
this . readAvatarNode = ReactDom . findDOMNode ( node ) ;
269
269
} ,
270
270
271
+ onMemberAvatarClicked : function ( sender ) {
272
+ dispatcher . dispatch ( {
273
+ action : 'view_user' ,
274
+ member : sender
275
+ } ) ;
276
+ } ,
277
+
271
278
render : function ( ) {
272
279
var MessageTimestamp = sdk . getComponent ( 'messages.MessageTimestamp' ) ;
273
280
var SenderProfile = sdk . getComponent ( 'messages.SenderProfile' ) ;
@@ -305,23 +312,13 @@ module.exports = React.createClass({
305
312
306
313
var readAvatars = this . getReadAvatars ( ) ;
307
314
308
- function onMemberAvatarClicked ( sender ) {
309
- return ( ) => {
310
- //var member = new Matrix.RoomMember(null, userId);
311
- //if (!member) { return; }
312
- dispatcher . dispatch ( {
313
- action : 'view_user' ,
314
- member : sender
315
- } ) ;
316
- } ;
317
- }
318
-
319
315
var avatar , sender ;
320
316
if ( ! this . props . continuation ) {
321
317
if ( this . props . mxEvent . sender ) {
322
318
avatar = (
323
- < div className = "mx_EventTile_avatar" style = { { cursor : "pointer" } } >
324
- < MemberAvatar member = { this . props . mxEvent . sender } width = { 24 } height = { 24 } onClick = { onMemberAvatarClicked ( this . props . mxEvent . sender ) } />
319
+ < div className = "mx_EventTile_avatar" >
320
+ < MemberAvatar member = { this . props . mxEvent . sender } width = { 24 } height = { 24 }
321
+ onClick = { this . onMemberAvatarClicked . bind ( this , this . props . mxEvent . sender ) } />
325
322
</ div >
326
323
) ;
327
324
}
You can’t perform that action at this time.
0 commit comments