Fixed Remove button being displayed in View Members modal (#715)

This commit is contained in:
Harrison Healey 2017-07-05 10:51:03 -04:00 committed by enahum
parent e54861a7e9
commit 4db267ff61

View file

@ -135,16 +135,21 @@ class ChannelMembers extends PureComponent {
};
emitCanRemoveMembers = (enabled) => {
this.props.navigator.setButtons({
rightButtons: [{...this.removeButton, disabled: !enabled}]
});
if (this.props.canManageUsers) {
this.props.navigator.setButtons({
rightButtons: [{...this.removeButton, disabled: !enabled}]
});
}
};
emitRemoving = (loading) => {
this.setState({canSelect: false, removing: loading});
this.props.navigator.setButtons({
rightButtons: [{...this.removeButton, disabled: loading}]
});
if (this.props.canManageUsers) {
this.props.navigator.setButtons({
rightButtons: [{...this.removeButton, disabled: loading}]
});
}
};
handleRemoveMembersPress = () => {