MOBILE-3833 mainmenu: Fix no tab selected on start

main
Dani Palou 2022-01-18 08:31:21 +01:00
parent f083a2e8be
commit c1a83f5df0
1 changed files with 2 additions and 1 deletions

View File

@ -138,7 +138,7 @@ export class CoreMainMenuPage implements OnInit, OnDestroy {
/**
* Init handlers on change (size or handlers).
*/
initHandlers(): void {
async initHandlers(): Promise<void> {
if (!this.allHandlers) {
return;
}
@ -175,6 +175,7 @@ export class CoreMainMenuPage implements OnInit, OnDestroy {
if (this.loaded && this.tabs[0] && !CoreNavigator.getCurrentMainMenuTab()) {
// No tab selected, select the first one.
await CoreUtils.nextTick();
this.mainTabs?.select(this.tabs[0].page);
}
}