Update src/addons/storagemanager/pages/course-storage/course-storage.ts

Co-authored-by: Noel De Martin <noel@noeldemartin.com>
main
toanlamt 2023-04-27 11:20:27 +07:00 committed by GitHub
parent ea794345f4
commit 53c66b3542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -494,12 +494,8 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy {
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;
});
if (this.totalSize === 0) {
this.sections.map(section => section.totalSize = 0);
}
this.changeDetectorRef.markForCheck();
}