MOBILE-2722 site: Add version class when adding site
parent
84d6ea5118
commit
597480c48f
|
@ -154,6 +154,16 @@ export class MoodleMobileApp implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.eventsProvider.on(CoreEventsProvider.SITE_ADDED, (data) => {
|
||||||
|
if (data.siteId == this.sitesProvider.getCurrentSiteId()) {
|
||||||
|
loadCustomStrings();
|
||||||
|
|
||||||
|
// Add version classes to body.
|
||||||
|
this.removeVersionClass();
|
||||||
|
this.addVersionClass(this.sitesProvider.getReleaseNumber(data.release || ''));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Pause Youtube videos in Android when app is put in background or screen is locked.
|
// Pause Youtube videos in Android when app is put in background or screen is locked.
|
||||||
this.platform.pause.subscribe(() => {
|
this.platform.pause.subscribe(() => {
|
||||||
if (!this.platform.is('android')) {
|
if (!this.platform.is('android')) {
|
||||||
|
|
|
@ -488,7 +488,7 @@ export class CoreSitesProvider {
|
||||||
this.sites[siteId] = candidateSite;
|
this.sites[siteId] = candidateSite;
|
||||||
// Store session.
|
// Store session.
|
||||||
this.login(siteId);
|
this.login(siteId);
|
||||||
this.eventsProvider.trigger(CoreEventsProvider.SITE_ADDED, {}, siteId);
|
this.eventsProvider.trigger(CoreEventsProvider.SITE_ADDED, info, siteId);
|
||||||
|
|
||||||
if (this.siteTablesSchemas.length) {
|
if (this.siteTablesSchemas.length) {
|
||||||
// Create tables in the site's database.
|
// Create tables in the site's database.
|
||||||
|
|
Loading…
Reference in New Issue