Skip to content

Commit 27a92ad

Browse files
committed
MOBILE-3401 login: Load styles on reconnect
1 parent 460ed1e commit 27a92ad

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/core/login/pages/reconnect/reconnect.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export class CoreLoginReconnectPage {
5050
protected siteConfig: any;
5151
protected isLoggedOut: boolean;
5252
protected siteId: string;
53+
protected viewLeft = false;
54+
protected eventThrown = false;
5355

5456
constructor(protected navCtrl: NavController,
5557
navParams: NavParams,
@@ -121,6 +123,14 @@ export class CoreLoginReconnectPage {
121123
});
122124
}
123125

126+
/**
127+
* View destroyed.
128+
*/
129+
ionViewWillUnload(): void {
130+
this.viewLeft = true;
131+
this.eventsProvider.trigger(CoreEventsProvider.LOGIN_SITE_UNCHECKED, { config: this.siteConfig }, this.siteId);
132+
}
133+
124134
/**
125135
* Get some data (like identity providers) from the site config.
126136
*
@@ -131,6 +141,11 @@ export class CoreLoginReconnectPage {
131141

132142
this.identityProviders = this.loginHelper.getValidIdentityProviders(config, disabledFeatures);
133143
this.showForgottenPassword = !this.loginHelper.isForgottenPasswordDisabled(config);
144+
145+
if (!this.eventThrown && !this.viewLeft) {
146+
this.eventThrown = true;
147+
this.eventsProvider.trigger(CoreEventsProvider.LOGIN_SITE_CHECKED, { config: config });
148+
}
134149
}
135150

136151
/**

0 commit comments

Comments
 (0)