From f7a442040c8dac8870b04cc4c711d4cb48721015 Mon Sep 17 00:00:00 2001 From: Kiet Ly Chan Date: Wed, 12 Feb 2020 10:49:23 +0700 Subject: [PATCH] MOBILE-3249 components: Hide delete menu item while downloading --- src/core/course/providers/helper.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/course/providers/helper.ts b/src/core/course/providers/helper.ts index d386f1a58..ad29690ee 100644 --- a/src/core/course/providers/helper.ts +++ b/src/core/course/providers/helper.ts @@ -815,6 +815,11 @@ export class CoreCourseHelperProvider { } } + if (moduleInfo.status == CoreConstants.DOWNLOADING) { + // Set this to 0 to prevent "remove file" option showing up while downloading. + instance.size = 0; + } + if (typeof instance.contextMenuStatusObserver == 'undefined' && component) { instance.contextMenuStatusObserver = this.eventsProvider.on(CoreEventsProvider.PACKAGE_STATUS_CHANGED, (data) => { if (data.componentId == module.id && data.component == component) {