diff --git a/src/core/classes/delegate-sorted.ts b/src/core/classes/delegate-sorted.ts index d9e6069d7..194a9ff2e 100644 --- a/src/core/classes/delegate-sorted.ts +++ b/src/core/classes/delegate-sorted.ts @@ -46,6 +46,8 @@ export class CoreSortedDelegate< this.clearSortedHandlers(); } }); + // Clear loaded handlers on login, there could be an invalid list loaded when user reconnects after token expired. + CoreEvents.on(CoreEvents.LOGIN, this.clearSortedHandlers.bind(this)); } /** diff --git a/src/core/services/navigator.ts b/src/core/services/navigator.ts index a807a74ee..344ad2822 100644 --- a/src/core/services/navigator.ts +++ b/src/core/services/navigator.ts @@ -581,7 +581,7 @@ export class CoreNavigatorService { return ''; } - const handlers = CoreMainMenuDelegate.getHandlers(); + const handlers = CoreMainMenuDelegate.getHandlers().filter((handler) => !handler.onlyInMore); return handlers[0]?.page || ''; }