From 068fba3616c4f9937632bc9c95f6b7fa50442785 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 19 Aug 2021 20:30:14 +0530 Subject: [PATCH] Inline method Signed-off-by: RMidhunSuresh --- src/domain/login/LoginViewModel.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/domain/login/LoginViewModel.js b/src/domain/login/LoginViewModel.js index 0f4a5915..76876a9b 100644 --- a/src/domain/login/LoginViewModel.js +++ b/src/domain/login/LoginViewModel.js @@ -49,7 +49,12 @@ export class LoginViewModel extends ViewModel { } else { this._errorMessage = ""; - await this.queryLogin(homeserver); + try { + this._loginOptions = await this._sessionContainer.queryLogin(homeserver); + } + catch (e) { + this._loginOptions = null; + } if (this._loginOptions) { if (this._loginOptions.sso) { this._showSSOLogin(); } if (this._loginOptions.password) { this._showPasswordLogin(); } @@ -78,15 +83,6 @@ export class LoginViewModel extends ViewModel { this.emitChange("errorMessage"); } - async queryLogin(homeserver) { - try { - this._loginOptions = await this._sessionContainer.queryLogin(homeserver); - } - catch (e) { - this._loginOptions = null; - } - } - _disposeViewModels() { this._startSSOLoginViewModel = this.disposeTracked(this._ssoLoginViewModel); this._passwordLoginViewModel = this.disposeTracked(this._passwordLoginViewModel);