Merge pull request #3398 from matrix-org/jryans/is-input-tweak

Stop setting IS input field on account change
This commit is contained in:
J. Ryan Stinnett 2019-09-09 10:28:00 +01:00 committed by GitHub
commit 24f1ec8abb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,18 +93,11 @@ export default class SetIdServer extends React.Component {
onAction = (payload) => { onAction = (payload) => {
// We react to changes in the ID server in the event the user is staring at this form // We react to changes in the ID server in the event the user is staring at this form
// when changing their identity server on another device. If the user is trying to change // when changing their identity server on another device.
// it in two places, we'll end up stomping all over their input, but at that point we
// should question our UX which led to them doing that.
if (payload.action !== "id_server_changed") return; if (payload.action !== "id_server_changed") return;
const fullUrl = MatrixClientPeg.get().getIdentityServerUrl();
let abbr = '';
if (fullUrl) abbr = abbreviateUrl(fullUrl);
this.setState({ this.setState({
currentClientIdServer: fullUrl, currentClientIdServer: MatrixClientPeg.get().getIdentityServerUrl(),
idServer: abbr,
}); });
}; };