From 7c985790975fea50dd028c8c015092a11904b964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 15 Jun 2022 11:09:32 +0200 Subject: [PATCH] MOBILE-4081 storage: Improve TODO comment --- .../storagemanager/pages/course-storage/course-storage.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.ts b/src/addons/storagemanager/pages/course-storage/course-storage.ts index 8b22a4fb4..3c3d001ef 100644 --- a/src/addons/storagemanager/pages/course-storage/course-storage.ts +++ b/src/addons/storagemanager/pages/course-storage/course-storage.ts @@ -482,9 +482,9 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy { * Mark course as not downloaded. */ protected markCourseAsNotDownloaded(): void { - // @TODO This is a workaround that should be more specific solving MOBILE-3305. - // Also should take into account all modules are not downloaded. - // Check after MOBILE-3188 is integrated. + // @TODO In order to correctly check the status of the course we should check all module statuses. + // We are currently marking as not downloaded if size is 0 but we should take into account that + // resources without files can be downloaded and cached. CoreCourse.setCourseStatus(this.courseId, CoreConstants.NOT_DOWNLOADED); } @@ -506,7 +506,6 @@ export class AddonStorageManagerCourseStoragePage implements OnInit, OnDestroy { * Confirm and prefetch a section. If the section is "all sections", prefetch all the sections. * * @param section Section to download. - * @param refresh Refresh clicked (not used). */ async prefecthSection(section: AddonStorageManagerCourseSection): Promise { section.isCalculating = true;