MOBILE-4300 course-storage: Update section size when delete all
parent
b6a2e5fccf
commit
ea794345f4
|
@ -492,6 +492,15 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy {
|
|||
|
||||
await this.updateModulesSizes(modules, section);
|
||||
CoreCourseHelper.calculateSectionsStatus(this.sections, this.courseId, false, false);
|
||||
|
||||
// For delete all, reset all section sizes so icons are updated.
|
||||
if (this.totalSize == 0) {
|
||||
this.sections.map((section) => {
|
||||
section.calculatingSize = true;
|
||||
section.totalSize = 0;
|
||||
section.calculatingSize = false;
|
||||
});
|
||||
}
|
||||
this.changeDetectorRef.markForCheck();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue