MOBILE-3320 courses: Download from course progress

main
Noel De Martin 2021-05-05 17:45:35 +02:00
parent 68e5312c73
commit 201ddac693
1 changed files with 6 additions and 6 deletions

View File

@ -140,17 +140,17 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy {
* *
* @param e Click event. * @param e Click event.
*/ */
prefetchCourse(e: Event): void { async prefetchCourse(e?: Event): Promise<void> {
e.preventDefault(); e?.preventDefault();
e.stopPropagation(); e?.stopPropagation();
/* @ todo try { try {
CoreCourseHelper.confirmAndPrefetchCourse(this.prefetchCourseData, this.course); await CoreCourseHelper.confirmAndPrefetchCourse(this.prefetchCourseData, this.course);
} catch (error) { } catch (error) {
if (!this.isDestroyed) { if (!this.isDestroyed) {
CoreDomUtils.showErrorModalDefault(error, 'core.course.errordownloadingcourse', true); CoreDomUtils.showErrorModalDefault(error, 'core.course.errordownloadingcourse', true);
} }
}*/ }
} }
/** /**