Skip to content

Commit 711a8ce

Browse files
author
Weblate
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 7a3c52a + 3eeabe8 commit 711a8ce

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

‎src/components/structures/RightPanel.js‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = React.createClass({
3131
displayName: 'RightPanel',
3232

3333
propTypes: {
34-
userId: React.PropTypes.string, // if showing an orphaned MemberInfo page, this is set
34+
// TODO: This should not be a prop, it should be received from the RoomViewStore
3535
roomId: React.PropTypes.string, // if showing panels for a given room, this is set
3636
collapsed: React.PropTypes.bool, // currently unused property to request for a minimized view of the panel
3737
},
@@ -57,17 +57,9 @@ module.exports = React.createClass({
5757
},
5858

5959
getInitialState: function() {
60-
if (this.props.userId) {
61-
var member = new Matrix.RoomMember(null, this.props.userId);
62-
return {
63-
phase: this.Phase.MemberInfo,
64-
member: member,
65-
};
66-
} else {
67-
return {
68-
phase: this.Phase.MemberList
69-
};
70-
}
60+
return {
61+
phase: this.Phase.MemberList
62+
};
7163
},
7264

7365
onMemberListButtonClick: function() {
@@ -229,7 +221,7 @@ module.exports = React.createClass({
229221
}
230222
else if(this.state.phase == this.Phase.MemberInfo) {
231223
var MemberInfo = sdk.getComponent('rooms.MemberInfo');
232-
panel = <MemberInfo member={this.state.member} key={this.props.roomId || this.props.userId} />
224+
panel = <MemberInfo member={this.state.member} key={this.props.roomId || this.state.member.userId} />
233225
}
234226
else if (this.state.phase == this.Phase.NotificationPanel) {
235227
panel = <NotificationPanel />

0 commit comments

Comments
 (0)