From a56ff029e7b3791f71c3b0801eaac82e1c0e7ef0 Mon Sep 17 00:00:00 2001 From: RKBoss6 Date: Fri, 1 Aug 2025 19:07:23 -0400 Subject: [PATCH] Remove notification from phone before checking for similar location --- apps/ios/boot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/ios/boot.js b/apps/ios/boot.js index 01db5e85c..ddea133d6 100644 --- a/apps/ios/boot.js +++ b/apps/ios/boot.js @@ -227,8 +227,9 @@ E.on('notify',msg=>{ lat: d.lat, lon: d.lon, location:d.city - }, require("Storage").readJSON("mylocation.json", true) || {}); - + }, require("Storage").readJSON("mylocation.json", true) || {}); + //remove notification from phone + NRF.ancsAction(msg.uid, false); if(Math.abs(myLocationJson.lat - locationJson.lat) < 0.0001 && Math.abs(myLocationJson.lon -locationJson.lon) < 0.0001){ //same location, do not write return; @@ -239,7 +240,7 @@ E.on('notify',msg=>{ myLocationJson.location=locationJson.city; require("Storage").write("mylocation.json",myLocationJson); - NRF.ancsAction(msg.uid, false); + return; }