mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Inline method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
738603e890
commit
068fba3616
@ -49,7 +49,12 @@ export class LoginViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this._errorMessage = "";
|
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) {
|
||||||
if (this._loginOptions.sso) { this._showSSOLogin(); }
|
if (this._loginOptions.sso) { this._showSSOLogin(); }
|
||||||
if (this._loginOptions.password) { this._showPasswordLogin(); }
|
if (this._loginOptions.password) { this._showPasswordLogin(); }
|
||||||
@ -78,15 +83,6 @@ export class LoginViewModel extends ViewModel {
|
|||||||
this.emitChange("errorMessage");
|
this.emitChange("errorMessage");
|
||||||
}
|
}
|
||||||
|
|
||||||
async queryLogin(homeserver) {
|
|
||||||
try {
|
|
||||||
this._loginOptions = await this._sessionContainer.queryLogin(homeserver);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
this._loginOptions = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_disposeViewModels() {
|
_disposeViewModels() {
|
||||||
this._startSSOLoginViewModel = this.disposeTracked(this._ssoLoginViewModel);
|
this._startSSOLoginViewModel = this.disposeTracked(this._ssoLoginViewModel);
|
||||||
this._passwordLoginViewModel = this.disposeTracked(this._passwordLoginViewModel);
|
this._passwordLoginViewModel = this.disposeTracked(this._passwordLoginViewModel);
|
||||||
|
Loading…
Reference in New Issue
Block a user