forked from mystiq/hydrogen-web
Inline method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
738603e890
commit
068fba3616
1 changed files with 6 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue