Update all 3PID state in Settings when IS changes

This ensures we update all 3PID state (like bind status) whenever the IS
changes.
This commit is contained in:
J. Ryan Stinnett 2019-09-11 16:16:07 +01:00
parent 0b7995dc11
commit db33c138aa
3 changed files with 25 additions and 9 deletions

View file

@ -50,6 +50,11 @@ export class PhoneNumber extends React.Component {
};
}
componentWillReceiveProps(nextProps) {
const { bound } = nextProps.msisdn;
this.setState({ bound });
}
async changeBinding({ bind, label, errorTitle }) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
const { medium, address } = this.props.msisdn;