Skip to content

Commit a56ff02

Browse files
authored
Remove notification from phone before checking for similar location
1 parent f35ce92 commit a56ff02

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/ios/boot.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ E.on('notify',msg=>{
227227
lat: d.lat,
228228
lon: d.lon,
229229
location:d.city
230-
}, require("Storage").readJSON("mylocation.json", true) || {});
231-
230+
}, require("Storage").readJSON("mylocation.json", true) || {});
231+
//remove notification from phone
232+
NRF.ancsAction(msg.uid, false);
232233
if(Math.abs(myLocationJson.lat - locationJson.lat) < 0.0001 && Math.abs(myLocationJson.lon -locationJson.lon) < 0.0001){
233234
//same location, do not write
234235
return;
@@ -239,7 +240,7 @@ E.on('notify',msg=>{
239240
myLocationJson.location=locationJson.city;
240241
require("Storage").write("mylocation.json",myLocationJson);
241242

242-
NRF.ancsAction(msg.uid, false);
243+
243244
return;
244245
}
245246

0 commit comments

Comments
 (0)