For future reference, data "sent" means from watch to phone (i.e. when it
enters the JS queue), while data "uploaded" or "posted" means from phone
to webserver (i.e. when it leaves the JS queue).
| ... | ... |
@@ -72,6 +72,7 @@ function sendHead() {
|
| 72 | 72 |
function enqueue(key, line) {
|
| 73 | 73 |
to_send.push(key + ";" + line); |
| 74 | 74 |
localStorage.setItem("toSend", to_send.join("|"));
|
| 75 |
+ localStorage.setItem("lastSent", key);
|
|
| 75 | 76 |
if (to_send.length === 1) {
|
| 76 | 77 |
Pebble.sendAppMessage({ "uploadStart": parseInt(key, 10) });
|
| 77 | 78 |
sendHead(); |
| ... | ... |
@@ -84,7 +85,6 @@ function uploadDone() {
|
| 84 | 85 |
} |
| 85 | 86 |
var sent_key = to_send.shift().split(";")[0];
|
| 86 | 87 |
localStorage.setItem("toSend", to_send.join("|"));
|
| 87 |
- localStorage.setItem("lastSent", key);
|
|
| 88 | 88 |
Pebble.sendAppMessage({ "uploadDone": parseInt(sent_key, 10) });
|
| 89 | 89 |
sendHead(); |
| 90 | 90 |
} |