Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Stop setting IS input field on account change #3398

Merged
merged 1 commit into from
Sep 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions src/components/views/settings/SetIdServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,11 @@ export default class SetIdServer extends React.Component {

onAction = (payload) => {
// 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
// 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.
// when changing their identity server on another device.
if (payload.action !== "id_server_changed") return;

const fullUrl = MatrixClientPeg.get().getIdentityServerUrl();
let abbr = '';
if (fullUrl) abbr = abbreviateUrl(fullUrl);

this.setState({
currentClientIdServer: fullUrl,
idServer: abbr,
currentClientIdServer: MatrixClientPeg.get().getIdentityServerUrl(),
});
};

Expand Down