MOBILE-3833 menu: Resort main menu page priorities
parent
3d784427cf
commit
e7f8b554df
|
@ -26,7 +26,7 @@ export class AddonBlogMainMenuHandlerService implements CoreMainMenuHandler {
|
|||
static readonly PAGE_NAME = 'blog';
|
||||
|
||||
name = 'AddonBlog';
|
||||
priority = 450;
|
||||
priority = 500;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
|
|
@ -26,7 +26,7 @@ export class AddonCalendarMainMenuHandlerService implements CoreMainMenuHandler
|
|||
static readonly PAGE_NAME = 'calendar';
|
||||
|
||||
name = 'AddonCalendar';
|
||||
priority = 900;
|
||||
priority = 800;
|
||||
|
||||
/**
|
||||
* Check if the handler is enabled on a site level.
|
||||
|
|
|
@ -38,7 +38,7 @@ export class AddonMessagesMainMenuHandlerService implements CoreMainMenuHandler,
|
|||
static readonly PAGE_NAME = 'messages';
|
||||
|
||||
name = 'AddonMessages';
|
||||
priority = 800;
|
||||
priority = 700;
|
||||
|
||||
protected handler: CoreMainMenuHandlerToDisplay = {
|
||||
icon: 'fas-comments',
|
||||
|
|
|
@ -33,7 +33,7 @@ export class AddonNotificationsMainMenuHandlerService implements CoreMainMenuHan
|
|||
static readonly PAGE_NAME = 'notifications';
|
||||
|
||||
name = 'AddonNotifications';
|
||||
priority = 700;
|
||||
priority = 600;
|
||||
|
||||
protected handlerData: CoreMainMenuHandlerData = {
|
||||
icon: 'fas-bell',
|
||||
|
|
|
@ -29,7 +29,7 @@ export class CoreCoursesMyCoursesMainMenuHandlerService implements CoreMainMenuH
|
|||
static readonly PAGE_NAME = 'courses';
|
||||
|
||||
name = 'CoreCoursesMyCourses';
|
||||
priority = 850;
|
||||
priority = 900;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
// limitations under the License.
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CoreDashboardHomeHandler } from '@features/courses/services/handlers/dashboard-home';
|
||||
import { CoreSiteHomeHomeHandler } from '@features/sitehome/services/handlers/sitehome-home';
|
||||
import { CoreSites } from '@services/sites';
|
||||
import { makeSingleton } from '@singletons';
|
||||
import { CoreMainMenuHandler, CoreMainMenuHandlerData } from '../mainmenu-delegate';
|
||||
|
||||
|
@ -25,13 +28,18 @@ export class CoreMainMenuHomeHandlerService implements CoreMainMenuHandler {
|
|||
static readonly PAGE_NAME = 'home';
|
||||
|
||||
name = 'CoreHome';
|
||||
priority = 1100;
|
||||
priority = 1000;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return true;
|
||||
const siteId = CoreSites.getCurrentSiteId();
|
||||
|
||||
const dashboardEnabled = await CoreDashboardHomeHandler.isEnabledForSite(siteId);
|
||||
const siteHomeEnabled = await CoreSiteHomeHomeHandler.isEnabledForSite(siteId);
|
||||
|
||||
return dashboardEnabled || siteHomeEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,7 @@ export class CoreTagMainMenuHandlerService implements CoreMainMenuHandler {
|
|||
static readonly PAGE_NAME = 'tag';
|
||||
|
||||
name = 'CoreTag';
|
||||
priority = 300;
|
||||
priority = 400;
|
||||
|
||||
/**
|
||||
* Check if the handler is enabled on a site level.
|
||||
|
|
Loading…
Reference in New Issue