Commit 488f4025 authored by LAVENIER's avatar LAVENIER
Browse files

Merge branch 'release/1.5.5'

parents 8be03ec5 be9d1093
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="10504" id="net.sumaris.app" version="1.5.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="10505" id="net.sumaris.app" version="1.5.5" 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>
......@@ -27,6 +27,7 @@
<preference name="ShowSplashScreen" value="true" />
<preference name="loadUrlTimeoutValue" value="60000" />
<platform name="android">
<preference name="android-targetSdkVersion" value="29" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
......
......@@ -15,7 +15,7 @@ if [[ "_$INSTALL_DIR" == "_" ]]; then
fi
latest_version() {
echo "1.5.4" #lastest
echo "1.5.5" #lastest
}
api_release_url() {
......
{
"name": "sumaris-app",
"description": "SUMARiS app",
"version": "1.5.4",
"version": "1.5.5",
"author": "contact@e-is.pro",
"license": "AGPL-3.0",
"readmeFilename": "README.md",
......
......@@ -14,5 +14,6 @@ cd ${PROJECT_DIR}
# Run the build
echo "Running cordova build..."
ionic cordova build android --warning-mode=none --color
#ionic cordova build android --warning-mode=none --color
#ionic cordova build android --warning-mode=none --color --verbose
ionic cordova build android --warning-mode=none --color --prod --release
......@@ -69,7 +69,7 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
if (this._mapToLightEntity && (!opts || opts.fullLoad !== false)) {
return this.loadFullEntity(id, opts);
}
return this.loadCachedEntity(id);
return this.loadCachedEntity(id, opts);
}
/**
......@@ -99,7 +99,7 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
return {
data,
total: res.total
}
};
})
)
);
......@@ -269,14 +269,14 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
const dirtyIndexes = Object.values(this._statusById)
.filter(s => s && s.dirty)
.map(s => s.index);
const entities = this._cache.slice();
const entities = this._cache.slice(); // Copy cached entities
// Mark all (entities and status) as pristine
this.markAsPristine({emitEvent: false});
// Map dirty entities to light entities (AFTER the previous copy)
// Convert dirty entities, in cache, into light entities (/!\ AFTER the previous copy)
if (this._mapToLightEntity) {
dirtyIndexes.forEach(index => this._cache[index] = this._mapToLightEntity(this._cache[index]));
dirtyIndexes.forEach(index => this._cache[index] = this._mapToLightEntity(entities[index]));
}
// If no entity found
......@@ -290,7 +290,7 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
// Save each entity into a unique key (advanced mode)
if (this.options.storeById) {
// Save ids
await this.storage.set(this._storageKey + "#ids", entities.filter(isNotNil).map(e => e.id));
await this.storage.set(this._storageKey + '#ids', entities.filter(isNotNil).map(e => e.id));
// Saved dirty entities
await Promise.all(
......@@ -298,7 +298,7 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
.map(index => {
const entity = entities[index];
console.info(`[entity-storage] Persisting ${this.name}#${entity.id}...`);
return this.storage.set(this._storageKey + "#" + entity.id, entity);
return this.storage.set(this._storageKey + '#' + entity.id, entity);
}));
console.info(`[entity-storage] Persisting ${dirtyIndexes.length}/${entities.length} ${this.name}(s)...`);
......@@ -394,9 +394,12 @@ export class EntityStore<T extends Entity<T>, O extends EntityStorageLoadOptions
// Reload from storage, if need (e.g. some attributes has been excluded in light elements)
if (status.dirty === false) {
console.debug(`[entity-storage] Full reloading ${this.name}#${id}...`);
return await this.storage.get(this._storageKey + '#' + id);
const fullData = await this.storage.get(this._storageKey + '#' + id);
if (fullData) return fullData;
// Not found by id, continue from cache (version prior to 1.5.3)
}
// Load from the cache, if dirty OR if storage is not splited by id
return this._cache[index];
}
......
......@@ -2,7 +2,7 @@
"name": "ADAP",
"short_name": "ADAP",
"manifest_version": 1,
"version": "1.5.4",
"version": "1.5.5",
"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