@@ -22,7 +22,7 @@ import {
2222 CoreMainMenuHandlerToDisplay ,
2323 CoreMainMenuPageNavHandlerToDisplay ,
2424} from '../../services/mainmenu-delegate' ;
25- import { CoreMainMenu , CoreMainMenuCustomItem } from '../../services/mainmenu' ;
25+ import { CoreMainMenu } from '../../services/mainmenu' ;
2626import { CoreEventObserver , CoreEvents } from '@singletons/events' ;
2727import { CoreNavigator } from '@services/navigator' ;
2828import { Translate } from '@singletons' ;
@@ -35,6 +35,8 @@ import { CoreUrl } from '@singletons/url';
3535import { CoreDynamicComponent } from '@components/dynamic-component/dynamic-component' ;
3636import { ReloadableComponent } from '@coretypes/reloadable-component' ;
3737import { CorePromiseUtils } from '@singletons/promise-utils' ;
38+ import { CoreCustomMenu , CoreCustomMenuItem } from '@features/mainmenu/services/custommenu' ;
39+ import { CoreCustomMenuItemComponent } from '@features/mainmenu/components/custom-menu-item/custom-menu-item' ;
3840
3941/**
4042 * Page that displays the more page of the app.
@@ -46,6 +48,7 @@ import { CorePromiseUtils } from '@singletons/promise-utils';
4648 imports : [
4749 CoreSharedModule ,
4850 CoreMainMenuUserButtonComponent ,
51+ CoreCustomMenuItemComponent ,
4952 ] ,
5053} )
5154export default class CoreMainMenuMorePage implements OnInit , OnDestroy {
@@ -55,7 +58,7 @@ export default class CoreMainMenuMorePage implements OnInit, OnDestroy {
5558 handlers ?: CoreMainMenuHandlerToDisplay [ ] ;
5659 handlersLoaded = false ;
5760 showScanQR : boolean ;
58- customItems ?: CoreMainMenuCustomItem [ ] ;
61+ customItems ?: CoreCustomMenuItem [ ] ;
5962 hasComponentHandlers = false ;
6063
6164 protected allHandlers ?: CoreMainMenuHandlerToDisplay [ ] ;
@@ -68,7 +71,7 @@ export default class CoreMainMenuMorePage implements OnInit, OnDestroy {
6871 this . langObserver = CoreEvents . on ( CoreEvents . LANGUAGE_CHANGED , ( ) => this . loadCustomMenuItems ( ) ) ;
6972
7073 this . updateSiteObserver = CoreEvents . on ( CoreEvents . SITE_UPDATED , async ( ) => {
71- this . customItems = await CoreMainMenu . getCustomMenuItems ( ) ;
74+ this . customItems = await CoreCustomMenu . getCustomMainMenuItems ( ) ;
7275 } , CoreSites . getCurrentSiteId ( ) ) ;
7376
7477 this . loadCustomMenuItems ( ) ;
@@ -128,7 +131,7 @@ export default class CoreMainMenuMorePage implements OnInit, OnDestroy {
128131 * Load custom menu items.
129132 */
130133 protected async loadCustomMenuItems ( ) : Promise < void > {
131- this . customItems = await CoreMainMenu . getCustomMenuItems ( ) ;
134+ this . customItems = await CoreCustomMenu . getCustomMainMenuItems ( ) ;
132135 }
133136
134137 /**
@@ -142,15 +145,6 @@ export default class CoreMainMenuMorePage implements OnInit, OnDestroy {
142145 CoreNavigator . navigateToSitePath ( handler . page , { params } ) ;
143146 }
144147
145- /**
146- * Open an embedded custom item.
147- *
148- * @param item Item to open.
149- */
150- openItem ( item : CoreMainMenuCustomItem ) : void {
151- CoreViewer . openIframeViewer ( item . label , item . url ) ;
152- }
153-
154148 /**
155149 * Open settings.
156150 */
0 commit comments