+
+
diff --git a/src/addon/storagemanager/pages/course-storage/course-storage.scss b/src/addon/storagemanager/pages/course-storage/course-storage.scss
index 2c03e4984..77e6022d7 100644
--- a/src/addon/storagemanager/pages/course-storage/course-storage.scss
+++ b/src/addon/storagemanager/pages/course-storage/course-storage.scss
@@ -13,12 +13,7 @@ ion-app.app-root page-addon-storagemanager-course-storage {
font-weight: bold;
font-size: 2rem;
}
- .size {
- margin-top: 4px;
- }
- .size ion-icon {
- margin-right: 4px;
- }
+
.core-module-icon {
margin-right: 4px;
width: 16px;
diff --git a/src/addon/storagemanager/pages/course-storage/course-storage.ts b/src/addon/storagemanager/pages/course-storage/course-storage.ts
index eb605fc57..ff9196403 100644
--- a/src/addon/storagemanager/pages/course-storage/course-storage.ts
+++ b/src/addon/storagemanager/pages/course-storage/course-storage.ts
@@ -19,6 +19,7 @@ import { CoreCourseModulePrefetchDelegate } from '@core/course/providers/module-
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
import { CoreDomUtilsProvider } from '@providers/utils/dom';
import { TranslateService } from '@ngx-translate/core';
+import { CoreConstants } from '@core/constants';
/**
* Page that displays the amount of file storage used by each activity on the course, and allows
@@ -84,6 +85,10 @@ export class AddonStorageManagerCourseStoragePage {
Promise.all(allPromises).then(() => {
this.loaded = true;
+
+ if (this.totalSize == 0) {
+ this.markCourseAsNotDownloaded();
+ }
});
});
}
@@ -162,6 +167,25 @@ export class AddonStorageManagerCourseStoragePage {
modal.dismiss();
this.domUtils.showErrorModalDefault(error, this.translate.instant('core.errordeletefile'));
+ }).finally(() => {
+ // @TODO This is a workaround that should be more specific solving MOBILE-3305.
+ // Also should take into account all modules are not downloaded.
+
+ // Mark course as not downloaded if course size is 0.
+ if (this.totalSize == 0) {
+ this.markCourseAsNotDownloaded();
+ }
});
}
+
+ /**
+ * 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.
+
+ this.courseProvider.setCourseStatus(this.course.id, CoreConstants.NOT_DOWNLOADED);
+ }
}
diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts
index 76d6b5628..ed0910a49 100644
--- a/src/components/tabs/tabs.ts
+++ b/src/components/tabs/tabs.ts
@@ -490,6 +490,7 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight + 'px';
this.tabBarElement.classList.remove('tabs-hidden');
this.tabsShown = true;
+ this.lastScroll = 0;
return;
}