Merge pull request #2278 from KietChan/MOBILE-3290_integration

MOBILE-3249 components: Hide delete menu item while downloading
main
Dani Palou 2020-02-12 08:59:15 +01:00 committed by GitHub
commit 6d06a7e41c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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) {