MOBILE-4470 remotethemes: Revert fix styles not loaded in offline

This reverts commit f75bfd39d1.
main
Dani Palou 2024-06-03 10:11:40 +02:00
parent aa08f5a3b0
commit 188808d41e
3 changed files with 3 additions and 14 deletions

View File

@ -144,7 +144,6 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
{ {
config: this.siteConfig, config: this.siteConfig,
loginSuccessful: this.loginSuccessful, loginSuccessful: this.loginSuccessful,
siteId: this.siteId,
}, },
this.siteId, this.siteId,
); );
@ -181,7 +180,7 @@ export class CoreLoginReconnectPage implements OnInit, OnDestroy {
if (!this.eventThrown && !this.viewLeft) { if (!this.eventThrown && !this.viewLeft) {
this.eventThrown = true; this.eventThrown = true;
CoreEvents.trigger(CoreEvents.LOGIN_SITE_CHECKED, { config: this.siteConfig, siteId: this.siteId }); CoreEvents.trigger(CoreEvents.LOGIN_SITE_CHECKED, { config: this.siteConfig });
} }
this.isBrowserSSO = CoreLoginHelper.isSSOLoginNeeded(this.siteConfig.typeoflogin); this.isBrowserSSO = CoreLoginHelper.isSSOLoginNeeded(this.siteConfig.typeoflogin);

View File

@ -148,15 +148,8 @@ export class CoreStylesService {
this.removeSite(site.getId()); this.removeSite(site.getId());
}); });
// Load temporary styles when site config is checked in login/reconnect. // Load temporary styles when site config is checked in login.
CoreEvents.on(CoreEvents.LOGIN_SITE_CHECKED, (data) => { CoreEvents.on(CoreEvents.LOGIN_SITE_CHECKED, (data) => {
if (data.siteId) {
// Reconnecting to a site, enable the site styles.
this.enableSiteStyles(data.siteId);
return;
}
this.loadTmpStyles(data.config).catch((error) => { this.loadTmpStyles(data.config).catch((error) => {
this.logger.error('Error loading tmp styles', error); this.logger.error('Error loading tmp styles', error);
}); });
@ -170,9 +163,8 @@ export class CoreStylesService {
return; return;
} }
// User didn't access the site, unload tmp styles and site styles if any. // The tmp styles are from a site that wasn't added in the end. Just remove them.
this.unloadTmpStyles(); this.unloadTmpStyles();
this.clear();
}); });
} }

View File

@ -428,7 +428,6 @@ export type CoreEventActivityDataSentData = {
*/ */
export type CoreEventLoginSiteCheckedData = { export type CoreEventLoginSiteCheckedData = {
config: CoreSitePublicConfigResponse; config: CoreSitePublicConfigResponse;
siteId?: string;
}; };
/** /**
@ -437,7 +436,6 @@ export type CoreEventLoginSiteCheckedData = {
export type CoreEventLoginSiteUncheckedData = { export type CoreEventLoginSiteUncheckedData = {
config?: CoreSitePublicConfigResponse; config?: CoreSitePublicConfigResponse;
loginSuccessful: boolean; loginSuccessful: boolean;
siteId?: string;
}; };
/** /**