MOBILE-2844 course: Display size instead of are you sure in prefetch

main
Dani Palou 2019-01-28 10:26:30 +01:00
parent edcc26f2c5
commit bf786ba596
1 changed files with 2 additions and 3 deletions

View File

@ -140,13 +140,12 @@ export class CoreDomUtilsProvider {
const readableSize = this.textUtils.bytesToSize(size.size, 2);
return this.showConfirm(this.translate.instant('core.course.confirmpartialdownloadsize', { size: readableSize }));
} else if (size.size >= wifiThreshold || (this.appProvider.isNetworkAccessLimited() && size.size >= limitedThreshold)) {
} else if (alwaysConfirm || size.size >= wifiThreshold ||
(this.appProvider.isNetworkAccessLimited() && size.size >= limitedThreshold)) {
message = message || 'core.course.confirmdownload';
const readableSize = this.textUtils.bytesToSize(size.size, 2);
return this.showConfirm(this.translate.instant(message, { size: readableSize }));
} else if (alwaysConfirm) {
return this.showConfirm(this.translate.instant('core.areyousure'));
}
return Promise.resolve();