From 201ddac693bdf356ccadeb92718ccd1e57f94367 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 5 May 2021 17:45:35 +0200 Subject: [PATCH] MOBILE-3320 courses: Download from course progress --- .../components/course-progress/course-progress.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/features/courses/components/course-progress/course-progress.ts b/src/core/features/courses/components/course-progress/course-progress.ts index dff808d28..75f0b9ce3 100644 --- a/src/core/features/courses/components/course-progress/course-progress.ts +++ b/src/core/features/courses/components/course-progress/course-progress.ts @@ -140,17 +140,17 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy { * * @param e Click event. */ - prefetchCourse(e: Event): void { - e.preventDefault(); - e.stopPropagation(); + async prefetchCourse(e?: Event): Promise { + e?.preventDefault(); + e?.stopPropagation(); - /* @ todo try { - CoreCourseHelper.confirmAndPrefetchCourse(this.prefetchCourseData, this.course); + try { + await CoreCourseHelper.confirmAndPrefetchCourse(this.prefetchCourseData, this.course); } catch (error) { if (!this.isDestroyed) { CoreDomUtils.showErrorModalDefault(error, 'core.course.errordownloadingcourse', true); } - }*/ + } } /**