MOBILE-4270 core: Wait for platform ready before hiding splash
parent
fee132d6e8
commit
cc565fe87b
|
@ -33,6 +33,7 @@ import { CoreDomUtils } from '@services/utils/dom';
|
||||||
import { CoreDom } from '@singletons/dom';
|
import { CoreDom } from '@singletons/dom';
|
||||||
import { CorePlatform } from '@services/platform';
|
import { CorePlatform } from '@services/platform';
|
||||||
import { CoreUrl } from '@singletons/url';
|
import { CoreUrl } from '@singletons/url';
|
||||||
|
import { CoreLogger } from '@singletons/logger';
|
||||||
|
|
||||||
const MOODLE_SITE_URL_PREFIX = 'url-';
|
const MOODLE_SITE_URL_PREFIX = 'url-';
|
||||||
const MOODLE_VERSION_PREFIX = 'version-';
|
const MOODLE_VERSION_PREFIX = 'version-';
|
||||||
|
@ -46,6 +47,8 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||||
|
|
||||||
@ViewChild(IonRouterOutlet) outlet?: IonRouterOutlet;
|
@ViewChild(IonRouterOutlet) outlet?: IonRouterOutlet;
|
||||||
|
|
||||||
|
protected logger = CoreLogger.getInstance('AppComponent');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
|
@ -196,7 +199,12 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreSubscriptions.once(this.outlet.activateEvents, () => SplashScreen.hide());
|
CoreSubscriptions.once(this.outlet.activateEvents, async () => {
|
||||||
|
await CorePlatform.ready();
|
||||||
|
|
||||||
|
this.logger.debug('Hide splash screen');
|
||||||
|
SplashScreen.hide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue