Force update the RightPanel when the member in MemberInfo is updated.

This commit is contained in:
Kegan Dougal 2015-12-04 16:16:41 +00:00
parent db5d9e2f6e
commit ac8fcbb264
1 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,11 @@ module.exports = React.createClass({
if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) { if (this.state.phase == this.Phase.MemberList && member.roomId === this.props.roomId) {
this.forceUpdate(); this.forceUpdate();
} }
else if (this.state.phase === this.Phase.MemberInfo && member.roomId === this.props.roomId &&
member.userId === this.state.member.userId) {
// refresh the member info (e.g. new power level)
this.forceUpdate();
}
}, },
onAction: function(payload) { onAction: function(payload) {