MOBILE-3249 components: Hide delete menu item while downloading

main
Kiet Ly Chan 2020-02-12 10:49:23 +07:00
parent 1411ef0697
commit f7a442040c
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) {