From 2b87f50c0b73c19360f1f833ab4d7af3dcc1e451 Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Fri, 4 May 2018 13:00:04 -0500 Subject: [PATCH] Update updated_at right away if offline --- src/lib/sync.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/sync.js b/src/lib/sync.js index 76d789e5..a8964120 100644 --- a/src/lib/sync.js +++ b/src/lib/sync.js @@ -94,6 +94,10 @@ export default class Sync { } syncOffline(items, callback) { + // Update all items updated_at to now + for(var item of items) { + item.updated_at = new Date(); + } this.writeItemsToStorage(items, true, function(responseItems){ // delete anything needing to be deleted for(var item of items) {