MOBILE-3026 core: Fix plugin_not_installed error in iOS
parent
f383894b7d
commit
7365bc708c
|
@ -110,19 +110,21 @@ export class MoodleMobileApp implements OnInit {
|
||||||
this.loginHelper.sitePolicyNotAgreed(data.siteId);
|
this.loginHelper.sitePolicyNotAgreed(data.siteId);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Refresh online status when changes.
|
this.platform.ready().then(() => {
|
||||||
this.network.onchange().subscribe(() => {
|
// Refresh online status when changes.
|
||||||
// Execute the callback in the Angular zone, so change detection doesn't stop working.
|
this.network.onchange().subscribe(() => {
|
||||||
this.zone.run(() => {
|
// Execute the callback in the Angular zone, so change detection doesn't stop working.
|
||||||
const isOnline = this.appProvider.isOnline();
|
this.zone.run(() => {
|
||||||
document.body.classList.toggle('core-offline', !isOnline);
|
const isOnline = this.appProvider.isOnline();
|
||||||
document.body.classList.toggle('core-online', isOnline);
|
document.body.classList.toggle('core-offline', !isOnline);
|
||||||
|
document.body.classList.toggle('core-online', isOnline);
|
||||||
|
|
||||||
if (isOnline) {
|
if (isOnline) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.body.classList.remove('core-online');
|
document.body.classList.remove('core-online');
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue