@sumaris-net/ngx-components 1.15.7 → 1.15.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +12 -1
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/services/platform.service.js +12 -2
- package/fesm2015/sumaris-net.ngx-components.js +12 -2
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/platform.service.d.ts +4 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -17751,6 +17751,10 @@
|
|
|
17751
17751
|
var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$1;
|
|
17752
17752
|
|
|
17753
17753
|
var moment$3 = momentImported__namespace;
|
|
17754
|
+
var AndroidOsEnvironment = Object.freeze({
|
|
17755
|
+
DIRECTORY_DOWNLOADS: 'Download',
|
|
17756
|
+
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
17757
|
+
});
|
|
17754
17758
|
var PlatformService = /** @class */ (function (_super) {
|
|
17755
17759
|
__extends(PlatformService, _super);
|
|
17756
17760
|
function PlatformService(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
@@ -17947,7 +17951,7 @@
|
|
|
17947
17951
|
var location$ = this._downloadingJobs.get(request.uri);
|
|
17948
17952
|
if (location$)
|
|
17949
17953
|
return location$;
|
|
17950
|
-
request = Object.assign(Object.assign({ visibleInDownloadsUi: true, notificationVisibility: ngx$6.NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request), { destinationInExternalPublicDir: Object.assign({ dirType:
|
|
17954
|
+
request = Object.assign(Object.assign({ visibleInDownloadsUi: true, notificationVisibility: ngx$6.NotificationVisibility.VisibleNotifyCompleted, title: request.title || request.filename }, request), { destinationInExternalPublicDir: Object.assign({ dirType: AndroidOsEnvironment.DIRECTORY_DOWNLOADS, subPath: request.filename || request.title || '' }, request.destinationInExternalPublicDir) });
|
|
17951
17955
|
console.debug('[platform] Downloading, using request: ' + JSON.stringify(request));
|
|
17952
17956
|
// Start download
|
|
17953
17957
|
location$ = rxjs.from(this.downloader.download(request));
|
|
@@ -17960,9 +17964,15 @@
|
|
|
17960
17964
|
_this._downloadingJobs.delete(request.uri);
|
|
17961
17965
|
return location;
|
|
17962
17966
|
}), operators.catchError(function (err) {
|
|
17967
|
+
var _a;
|
|
17963
17968
|
console.error('[platform] Unable to download: ' + (err && err.message || err));
|
|
17964
17969
|
// Forget the request
|
|
17965
17970
|
_this._downloadingJobs.delete(request.uri);
|
|
17971
|
+
// Retry with another location - issue in older Android version
|
|
17972
|
+
if (((_a = request.destinationInExternalPublicDir) === null || _a === void 0 ? void 0 : _a.dirType) === AndroidOsEnvironment.DIRECTORY_DOWNLOADS) {
|
|
17973
|
+
request.destinationInExternalPublicDir.dirType = AndroidOsEnvironment.DIRECTORY_DOWNLOADS_OLD;
|
|
17974
|
+
return _this.download(request);
|
|
17975
|
+
}
|
|
17966
17976
|
throw err;
|
|
17967
17977
|
}));
|
|
17968
17978
|
}
|
|
@@ -31226,6 +31236,7 @@
|
|
|
31226
31236
|
exports.AdminModule = AdminModule;
|
|
31227
31237
|
exports.AdminRoutingModule = AdminRoutingModule;
|
|
31228
31238
|
exports.Alerts = Alerts;
|
|
31239
|
+
exports.AndroidOsEnvironment = AndroidOsEnvironment;
|
|
31229
31240
|
exports.AppEditor = AppEditor;
|
|
31230
31241
|
exports.AppEditorOptions = AppEditorOptions;
|
|
31231
31242
|
exports.AppEntityEditor = AppEntityEditor;
|