Cloud sync: triggers

This commit is contained in:
M66B
2023-01-16 09:59:21 +01:00
parent 4ca9f3222e
commit f91c317f95
6 changed files with 3073 additions and 4 deletions

View File

@@ -1543,6 +1543,10 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
long sync_status = prefs.getLong("sync_status", new Date().getTime());
Log.i("Cloud sync status=" + sync_status);
for (EntitySync s : db.sync().getSync(null, null, Long.MAX_VALUE))
Log.i("Cloud sync " + s.entity + ":" + s.reference + " " + s.action + " " + new Date(s.time));
db.sync().deleteSync(Long.MAX_VALUE);
JSONObject jsyncstatus = new JSONObject();
jsyncstatus.put("key", "sync.status");
jsyncstatus.put("rev", sync_status);