Commit dbdc9851 authored by LAVENIER's avatar LAVENIER
Browse files

Merge branch 'release/1.6.1'

parents 4fa7174a 57f35ba8
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="10600" id="net.sumaris.app" version="1.6.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="10601" id="net.sumaris.app" version="1.6.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>SUMARiS</name>
<description>Halieutic data capture</description>
<author email="contact@e-is.pro" href="http://www.e-is.pro">Environmental Information Systems</author>
......
......@@ -15,7 +15,7 @@ if [[ "_$INSTALL_DIR" == "_" ]]; then
fi
latest_version() {
echo "1.6.0" #lastest
echo "1.6.1" #lastest
}
api_release_url() {
......
{
"name": "sumaris-app",
"description": "SUMARiS app",
"version": "1.6.0",
"version": "1.6.1",
"author": "contact@e-is.pro",
"license": "AGPL-3.0",
"readmeFilename": "README.md",
......
......@@ -332,6 +332,7 @@ export class PlatformService {
}
protected async onStartupError(err) {
console.error('[platform] Failed starting the platform! ', err);
let message = err && err.message || err;
const detailsMessage = err && (err.details && err.details.message || err.details);
if (this.translate) {
......@@ -354,12 +355,16 @@ export class PlatformService {
message
});
}
else {
else if (window) {
if (detailsMessage) {
message += `\n\n{cause: "${detailsMessage}"}`;
}
window.alert(message);
}
else {
console.error(message);
if (err && err.details) console.error("cause", err.details);
}
}
}
......@@ -315,7 +315,7 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
// Save each entity into a unique key (advanced mode)
if (this.isByIdMode) {
// Save ids
await this.storage.set(this._storageKey + '#ids', entities.filter(isNotNil).map(e => e.id));
await this.storage.set(this.storageKeyById, entities.filter(isNotNil).map(e => e.id));
// Saved dirty entities
await Promise.all(
......@@ -382,9 +382,9 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
}
// OK, there is something in storage...
if (isNil(entities)) {
if (entities && entities.length >= 1000) {
console.warn(`[entity-storage] - Restoring ${entities.length} ${this.name}...`);
if (isNotEmptyArray(entities)) {
if (entities.length >= 1000) {
console.warn(`[entity-storage] - Restoring ${entities.length} ${this.name}. Check if not too many elements?!`);
}
// Map entities into light element (if if not need to persist, because of migration
......@@ -405,10 +405,10 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
await this.persist({skipIfPristine: false /* force persist using the new mode */ });
// Clean old storage keys (one by one)
await chainPromises(oldKeysToClean.map(key => () => this.storage.remove(key)));
if (isNotEmptyArray(oldKeysToClean)) await chainPromises(oldKeysToClean.map(key => () => this.storage.remove(key)));
}
catch (err) {
console.error();
console.error(err);
throw {code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err};
}
}
......
......@@ -2,7 +2,7 @@
"name": "ADAP",
"short_name": "ADAP",
"manifest_version": 1,
"version": "1.6.0",
"version": "1.6.1",
"default_locale": "fr",
"description": "ADAP App.",
"icons": [{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment