From f1f39537498c3750f6c35c5dbcc2a0b5c7646c1c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 4 May 2021 15:49:23 +0200 Subject: [PATCH] MOBILE-3320 core: Fix preferences and course preview in production --- .../course-list-item/course-list-item.ts | 2 +- src/core/features/mainmenu/pages/more/more.html | 6 ++---- src/core/features/mainmenu/pages/more/more.ts | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/core/features/courses/components/course-list-item/course-list-item.ts b/src/core/features/courses/components/course-list-item/course-list-item.ts index 5f3ef4cb7..e7778782f 100644 --- a/src/core/features/courses/components/course-list-item/course-list-item.ts +++ b/src/core/features/courses/components/course-list-item/course-list-item.ts @@ -94,7 +94,7 @@ export class CoreCoursesCourseListItemComponent implements OnInit { if (this.isEnrolled) { CoreCourseHelper.openCourse(this.course); } else { - CoreNavigator.navigate( + CoreNavigator.navigateToSitePath( '/course/' + this.course.id + '/preview', { params: { course: this.course } }, ); diff --git a/src/core/features/mainmenu/pages/more/more.html b/src/core/features/mainmenu/pages/more/more.html index f2db75961..6f0fc716f 100644 --- a/src/core/features/mainmenu/pages/more/more.html +++ b/src/core/features/mainmenu/pages/more/more.html @@ -70,8 +70,7 @@

{{ 'core.mainmenu.help' | translate }}

- +

{{ 'core.settings.preferences' | translate }}

@@ -84,8 +83,7 @@
- +

{{ 'core.settings.appsettings' | translate }}

diff --git a/src/core/features/mainmenu/pages/more/more.ts b/src/core/features/mainmenu/pages/more/more.ts index 83e5703f3..4e48698dc 100644 --- a/src/core/features/mainmenu/pages/more/more.ts +++ b/src/core/features/mainmenu/pages/more/more.ts @@ -153,6 +153,20 @@ export class CoreMainMenuMorePage implements OnInit, OnDestroy { CoreNavigator.navigateToSitePath('viewer/iframe', { params: { title: item.label, url: item.url } }); } + /** + * Open preferences. + */ + openPreferences(): void { + CoreNavigator.navigateToSitePath('preferences'); + } + + /** + * Open settings. + */ + openSettings(): void { + CoreNavigator.navigateToSitePath('settings'); + } + /** * Scan and treat a QR code. */