MOBILE-3833 course: Fix open site home from module summary

main
Dani Palou 2022-03-18 12:51:30 +01:00
parent 5e0a46aa75
commit da11a08c07
1 changed files with 7 additions and 0 deletions

View File

@ -1266,6 +1266,13 @@ export class CoreCourseProvider {
course: CoreCourseAnyCourseData | { id: number },
navOptions?: CoreNavigationOptions,
): Promise<void> {
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.