From 1ff4bb17ef5185cb7f1b37ceaa4dc53403097281 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Tue, 13 Jul 2021 09:30:44 +0200 Subject: [PATCH] MOBILE-3320 course: Fix download loading status --- src/core/features/course/services/course-helper.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/features/course/services/course-helper.ts b/src/core/features/course/services/course-helper.ts index c1d217392..d4127950e 100644 --- a/src/core/features/course/services/course-helper.ts +++ b/src/core/features/course/services/course-helper.ts @@ -381,6 +381,7 @@ export class CoreCourseHelperProvider { data.downloadSucceeded = false; data.icon = CoreConstants.ICON_DOWNLOADING; data.status = CoreConstants.DOWNLOADING; + data.loading = true; data.statusTranslatable = 'core.downloading'; try { @@ -405,11 +406,13 @@ export class CoreCourseHelperProvider { // Download successful. data.downloadSucceeded = true; + data.loading = false; } catch (error) { // User cancelled or there was an error. data.icon = initialIcon; data.status = initialStatus; data.statusTranslatable = initialStatusTranslatable; + data.loading = false; throw error; }