From da11a08c074d593f927d0df65f669520615ef1b7 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 18 Mar 2022 12:51:30 +0100 Subject: [PATCH] MOBILE-3833 course: Fix open site home from module summary --- src/core/features/course/services/course.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/features/course/services/course.ts b/src/core/features/course/services/course.ts index d0997cd51..94609b78b 100644 --- a/src/core/features/course/services/course.ts +++ b/src/core/features/course/services/course.ts @@ -1266,6 +1266,13 @@ export class CoreCourseProvider { course: CoreCourseAnyCourseData | { id: number }, navOptions?: CoreNavigationOptions, ): Promise { + if (course.id === CoreSites.getCurrentSite()?.getSiteHomeId()) { + // Open site home. + await CoreNavigator.navigate('/main/home/site', navOptions); + + return; + } + const loading = await CoreDomUtils.showModalLoading(); // Wait for site plugins to be fetched.