commit 26395cbf11d65f95e56e4b3fe8b50680ef3ae6f6
parent 390d26ac0eb84a3c399a7034073cc48efa966eb2
Author: Natasha Kerensikova <natacha@instinctive.eu>
Date: Mon, 23 May 2016 14:56:37 +0000
Send a message to the watch when the phone send queue becomes empty
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/appinfo.json b/appinfo.json
@@ -13,6 +13,7 @@
},
"appKeys": {
"lastSent": 110,
+ "lastPosted": 120,
"dataKey": 210,
"dataLine": 220,
"cfgWakeupTime": 320
diff --git a/src/js/app.js b/src/js/app.js
@@ -71,6 +71,9 @@ function uploadDone() {
var sent_key = to_send.shift().split(";")[0];
localStorage.setItem("toSend", to_send.join("|"));
localStorage.setItem("lastSent", sent_key);
+ if (to_send.length() === 0) {
+ Pebble.sendAppMessage({ "lastPosted": parseInt(sent_key, 10) });
+ }
sendHead();
}