Little fixes on member list

This commit is contained in:
David Baker 2015-06-22 13:15:14 +01:00
parent 0424ef07b3
commit 2ba4ad04d1
3 changed files with 5 additions and 3 deletions

View file

@ -1,10 +1,12 @@
var dis = require("../../dispatcher"); var dis = require("../../dispatcher");
var MatrixClientPeg = require("../../MatrixClientPeg");
module.exports = { module.exports = {
onClick: function() { onClick: function() {
dis.dispatch({ dis.dispatch({
action: 'view_user', action: 'view_user',
room_id: this.props.member.userId user_id: this.props.member.userId
}); });
}, },
}; };

View file

@ -22,6 +22,7 @@ module.exports = {
},*/ },*/
onRoomStateMember: function(ev, state, member) { onRoomStateMember: function(ev, state, member) {
var cli = MatrixClientPeg.get();
this.setState({ this.setState({
memberDict: cli.getRoom(this.props.roomId).currentState.members memberDict: cli.getRoom(this.props.roomId).currentState.members
}); });

View file

@ -16,10 +16,9 @@ module.exports = React.createClass({
return Object.keys(that.state.memberDict).map(function(userId) { return Object.keys(that.state.memberDict).map(function(userId) {
var m = that.state.memberDict[userId]; var m = that.state.memberDict[userId];
return ( return (
<li> <li key={userId}>
<MemberTile <MemberTile
member={m} member={m}
key={userId}
/> />
</li> </li>
); );