Merge pull request #3645 from NashTechOpenUniversity/MOBILE-4300

MOBILE-4300 course-storage: Update section size when delete all
main
Noel De Martin 2023-04-27 08:52:29 +02:00 committed by GitHub
commit e9fb8784b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -492,6 +492,11 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy {
await this.updateModulesSizes(modules, section); await this.updateModulesSizes(modules, section);
CoreCourseHelper.calculateSectionsStatus(this.sections, this.courseId, false, false); 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.totalSize = 0);
}
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
} }
} }