From c2e82f7ad1a30b08aca0ab427990c746b79de5ac Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 17 Jun 2021 09:05:29 +0200 Subject: [PATCH] MOBILE-3320 home: Try to prevent empty box displayed for an instant --- src/core/features/mainmenu/pages/home/home.html | 4 +--- src/core/features/mainmenu/pages/home/home.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/features/mainmenu/pages/home/home.html b/src/core/features/mainmenu/pages/home/home.html index aa46be819..903bcb8ff 100644 --- a/src/core/features/mainmenu/pages/home/home.html +++ b/src/core/features/mainmenu/pages/home/home.html @@ -12,9 +12,7 @@ - - - + diff --git a/src/core/features/mainmenu/pages/home/home.ts b/src/core/features/mainmenu/pages/home/home.ts index 201215b47..c7dfce575 100644 --- a/src/core/features/mainmenu/pages/home/home.ts +++ b/src/core/features/mainmenu/pages/home/home.ts @@ -86,6 +86,7 @@ export class CoreMainMenuHomePage implements OnInit { */ initHandlers(handlers: CoreMainMenuHomeHandlerToDisplay[]): void { // Re-build the list of tabs. + const loaded = CoreMainMenuHomeDelegate.areHandlersLoaded(); const handlersMap = CoreUtils.arrayToObject(handlers, 'title'); const newTabs = handlers.map((handler): CoreTabsOutletTab => { const tab = this.tabs.find(tab => tab.title == handler.title); @@ -125,7 +126,10 @@ export class CoreMainMenuHomePage implements OnInit { this.tabs = newTabs; - this.loaded = CoreMainMenuHomeDelegate.areHandlersLoaded(); + // Try to prevent empty box displayed for an instant when it shouldn't. + setTimeout(() => { + this.loaded = loaded; + }, 50); } /**