MOBILE-3401 login: Load styles on reconnect
parent
460ed1efa4
commit
27a92adaac
|
@ -50,6 +50,8 @@ export class CoreLoginReconnectPage {
|
||||||
protected siteConfig: any;
|
protected siteConfig: any;
|
||||||
protected isLoggedOut: boolean;
|
protected isLoggedOut: boolean;
|
||||||
protected siteId: string;
|
protected siteId: string;
|
||||||
|
protected viewLeft = false;
|
||||||
|
protected eventThrown = false;
|
||||||
|
|
||||||
constructor(protected navCtrl: NavController,
|
constructor(protected navCtrl: NavController,
|
||||||
navParams: NavParams,
|
navParams: NavParams,
|
||||||
|
@ -121,6 +123,14 @@ export class CoreLoginReconnectPage {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View destroyed.
|
||||||
|
*/
|
||||||
|
ionViewWillUnload(): void {
|
||||||
|
this.viewLeft = true;
|
||||||
|
this.eventsProvider.trigger(CoreEventsProvider.LOGIN_SITE_UNCHECKED, { config: this.siteConfig }, this.siteId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get some data (like identity providers) from the site config.
|
* Get some data (like identity providers) from the site config.
|
||||||
*
|
*
|
||||||
|
@ -131,6 +141,11 @@ export class CoreLoginReconnectPage {
|
||||||
|
|
||||||
this.identityProviders = this.loginHelper.getValidIdentityProviders(config, disabledFeatures);
|
this.identityProviders = this.loginHelper.getValidIdentityProviders(config, disabledFeatures);
|
||||||
this.showForgottenPassword = !this.loginHelper.isForgottenPasswordDisabled(config);
|
this.showForgottenPassword = !this.loginHelper.isForgottenPasswordDisabled(config);
|
||||||
|
|
||||||
|
if (!this.eventThrown && !this.viewLeft) {
|
||||||
|
this.eventThrown = true;
|
||||||
|
this.eventsProvider.trigger(CoreEventsProvider.LOGIN_SITE_CHECKED, { config: config });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue