Skip to content

Commit

Permalink
fix(poi-rlt): not staying deactivated after opening again the app
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jul 23, 2024
1 parent 19e23f1 commit a380e56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"androidScheme": "https"
},
"android": {
"overrideUserAgent": "IGN-app-android"
"overrideUserAgent": "IGN-app-android",
"flavor": "google"
},
"ios": {
"overrideUserAgent": "IGN-app-ios",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"serve:dev": "webpack-dev-server --config webpack.dev.js --hot",
"run:android": "npm run build:dev && npx cap sync && npx cap run android",
"install:android": "npm run build && npx cap sync && cd android && ./gradlew assembleRelease && cd app/build/outputs/apk/google/release && rm -f app-google-release.apk && zipalign 4 app-google-release-unsigned.apk app-google-release.apk && apksigner sign --ks ~/ign.keystore --v1-signing-enabled true --v2-signing-enabled true app-google-release.apk && adb install app-google-release.apk",
"install:android:debug": "npm run build:dev && npx cap sync && cd android && ./gradlew assembleDebug && cd app/build/outputs/apk/google/debug && rm -f app-google-debug-signed.apk && zipalign 4 app-google-debug.apk app-google-debug-signed.apk && apksigner sign --ks ~/ign.keystore --v1-signing-enabled true --v2-signing-enabled true app-google-debug-signed.apk && adb install app-google-debug-signed.apk",
"install:android:debug": "npm run build:dev && npx cap sync && cd android && rm -rf app/build/outputs/apk/google/debug/app-* && ./gradlew assembleDebug && cd app/build/outputs/apk/google/debug && zipalign 4 app-google-debug.apk app-google-debug-signed.apk && apksigner sign --ks ~/ign.keystore --v1-signing-enabled true --v2-signing-enabled true app-google-debug-signed.apk && adb install app-google-debug-signed.apk",
"install:android:foss:debug": "npm run build:dev && npx cap sync && cd android && rm -rf app/build/outputs/apk/fdroid/debug/app-* && ./gradlew assembleDebug -PbuildFlavor=fdroid && cd app/build/outputs/apk/fdroid/debug && ls && zipalign 4 app-google-debug.apk app-google-debug-signed.apk && apksigner sign --ks ~/ign.keystore --v1-signing-enabled true --v2-signing-enabled true app-google-debug-signed.apk && adb install app-google-debug-signed.apk",
"build:android": "npm run build && npx cap sync && cd android && ./gradlew assembleRelease -PbuildFlavor=google",
"build:android:foss": "npm run build && npx cap sync && cd android && ./gradlew assembleRelease -PbuildFlavor=fdroid",
"build:android:dev": "npm run build:dev && npx cap sync && cd android && ./gradlew",
Expand Down
8 changes: 4 additions & 4 deletions src/js/poi.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ class POI {
}

let rltChecked = "checked";
// Chargement de la position précédente
if (localStorage.getItem("poirltChecked")) {
rltChecked = localStorage.getItem("poirltChecked");
// Chargement de la valeut de la checkbox POI RLT
if (localStorage.getItem("poirltChecked") !== "checked") {
rltChecked = "";
}

var tpltContainer = `
Expand Down Expand Up @@ -265,7 +265,7 @@ class POI {
this.map.flyTo({zoom: 4, center: [2.0, 47.33]});
} else {
Globals.comparePoi.hidePoints();
localStorage.setItem("poirltChecked", "");
localStorage.setItem("poirltChecked", "unchecked");
}
});
// rendre visible ou non le filtre si la couche POI est active sinon rien à faire
Expand Down

0 comments on commit a380e56

Please sign in to comment.