diff --git a/src/domain/login/CompleteSSOLoginViewModel.js b/src/domain/login/CompleteSSOLoginViewModel.js index ded09cd9..c06b3ffd 100644 --- a/src/domain/login/CompleteSSOLoginViewModel.js +++ b/src/domain/login/CompleteSSOLoginViewModel.js @@ -37,7 +37,6 @@ export class CompleteSSOLoginViewModel extends ViewModel { _showError(message) { this._errorMessage = message; this.emitChange("errorMessage"); - this._errorMessage = ""; } async performSSOLoginCompletion() { diff --git a/src/domain/login/LoginViewModel.js b/src/domain/login/LoginViewModel.js index 27e45d1f..13087581 100644 --- a/src/domain/login/LoginViewModel.js +++ b/src/domain/login/LoginViewModel.js @@ -114,7 +114,6 @@ export class LoginViewModel extends ViewModel { _showError(message) { this._errorMessage = message; this.emitChange("errorMessage"); - this._errorMessage = ""; } _toggleBusy(status) { @@ -180,6 +179,8 @@ export class LoginViewModel extends ViewModel { } updateHomeServer(newHomeserver) { + this._errorMessage = ""; + this.emitChange("errorMessage"); this._homeserver = newHomeserver; this._disposeViewModels(); this._createViewModels(newHomeserver); diff --git a/src/domain/login/PasswordLoginViewModel.js b/src/domain/login/PasswordLoginViewModel.js index 8cdef3c5..0d534b90 100644 --- a/src/domain/login/PasswordLoginViewModel.js +++ b/src/domain/login/PasswordLoginViewModel.js @@ -38,10 +38,11 @@ export class PasswordLoginViewModel extends ViewModel { _showError(message) { this._errorMessage = message; this.emitChange("errorMessage"); - this._errorMessage = ""; } async login(username, password) { + this._errorMessage = ""; + this.emitChange("errorMessage"); const loginMethod = this._loginOptions.password(username, password); const status = await this._attemptLogin(loginMethod); let error = "";