MOBILE-4270 core: Add more logging in app component

main
Dani Palou 2023-05-09 16:31:37 +02:00
parent 1f3d72cfbb
commit 5b3244b619
1 changed files with 7 additions and 0 deletions

View File

@ -196,10 +196,15 @@ export class AppComponent implements OnInit, AfterViewInit {
*/ */
ngAfterViewInit(): void { ngAfterViewInit(): void {
if (!this.outlet) { if (!this.outlet) {
this.logger.debug('Aftew view init: no outlet found');
return; return;
} }
this.logger.debug('Aftew view init');
CoreSubscriptions.once(this.outlet.activateEvents, async () => { CoreSubscriptions.once(this.outlet.activateEvents, async () => {
this.logger.debug('Activate event triggered');
await CorePlatform.ready(); await CorePlatform.ready();
this.logger.debug('Hide splash screen'); this.logger.debug('Hide splash screen');
@ -213,6 +218,8 @@ export class AppComponent implements OnInit, AfterViewInit {
protected async onPlatformReady(): Promise<void> { protected async onPlatformReady(): Promise<void> {
await CorePlatform.ready(); await CorePlatform.ready();
this.logger.debug('Platform is ready');
// Refresh online status when changes. // Refresh online status when changes.
CoreNetwork.onChange().subscribe(() => { CoreNetwork.onChange().subscribe(() => {
// Execute the callback in the Angular zone, so change detection doesn't stop working. // Execute the callback in the Angular zone, so change detection doesn't stop working.