MOBILE-3833 mainmenu: Add log when select first tab
parent
50322300ac
commit
56a9a432b8
|
@ -30,6 +30,7 @@ import { NavigationEnd } from '@angular/router';
|
||||||
import { trigger, state, style, transition, animate } from '@angular/animations';
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
||||||
import { CoreSites } from '@services/sites';
|
import { CoreSites } from '@services/sites';
|
||||||
import { CoreDom } from '@singletons/dom';
|
import { CoreDom } from '@singletons/dom';
|
||||||
|
import { CoreLogger } from '@singletons/logger';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page that displays the main menu of the app.
|
* Page that displays the main menu of the app.
|
||||||
|
@ -81,6 +82,7 @@ export class CoreMainMenuPage implements OnInit, OnDestroy {
|
||||||
protected urlToOpen?: string;
|
protected urlToOpen?: string;
|
||||||
protected redirectPath?: string;
|
protected redirectPath?: string;
|
||||||
protected redirectOptions?: CoreNavigationOptions;
|
protected redirectOptions?: CoreNavigationOptions;
|
||||||
|
protected logger: CoreLogger;
|
||||||
|
|
||||||
@ViewChild('mainTabs') mainTabs?: IonTabs;
|
@ViewChild('mainTabs') mainTabs?: IonTabs;
|
||||||
|
|
||||||
|
@ -89,6 +91,7 @@ export class CoreMainMenuPage implements OnInit, OnDestroy {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.backButtonFunction = this.backButtonClicked.bind(this);
|
this.backButtonFunction = this.backButtonClicked.bind(this);
|
||||||
this.tabAction = new CoreMainMenuRoleTab(this);
|
this.tabAction = new CoreMainMenuRoleTab(this);
|
||||||
|
this.logger = CoreLogger.getInstance('CoreMainMenuPage');
|
||||||
|
|
||||||
// Listen navigation events to show or hide tabs.
|
// Listen navigation events to show or hide tabs.
|
||||||
this.navSubscription = Router.events
|
this.navSubscription = Router.events
|
||||||
|
@ -187,6 +190,7 @@ export class CoreMainMenuPage implements OnInit, OnDestroy {
|
||||||
|
|
||||||
const tabPage = this.tabs[0] ? this.tabs[0].page : this.morePageName;
|
const tabPage = this.tabs[0] ? this.tabs[0].page : this.morePageName;
|
||||||
const tabPageParams = this.tabs[0] ? this.tabs[0].pageParams : {};
|
const tabPageParams = this.tabs[0] ? this.tabs[0].pageParams : {};
|
||||||
|
this.logger.debug(`Select first tab: ${tabPage}.`, this.tabs);
|
||||||
|
|
||||||
// Use navigate instead of mainTabs.select to be able to pass page params.
|
// Use navigate instead of mainTabs.select to be able to pass page params.
|
||||||
CoreNavigator.navigate(tabPage, {
|
CoreNavigator.navigate(tabPage, {
|
||||||
|
|
Loading…
Reference in New Issue