From dd4e3d498d129ec97d41f25281a96957c05d2bb5 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Tue, 19 Mar 2013 13:59:09 -0700 Subject: [PATCH] Set successful sync after loop initiated from background sync --- .../com/todoroo/astrid/actfm/sync/ActFmSyncThread.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java index aacd1f5d0..cb3a3b98b 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java @@ -296,6 +296,7 @@ public class ActFmSyncThread { } } + boolean recordSyncSuccess = true; if (timeForBackgroundSync()) { repopulateQueueFromOutstandingTables(); enqueueMessage(BriefMe.instantiateBriefMeForClass(TaskListMetadata.class, NameMaps.PUSHED_AT_TASK_LIST_METADATA), DEFAULT_REFRESH_RUNNABLE); @@ -358,6 +359,9 @@ public class ActFmSyncThread { } batchSize = Math.min(batchSize, messageBatch.size()) * 2; + + if (recordSyncSuccess) + actFmPreferenceService.recordSuccessfulSync(); } catch (IOException e) { Log.e(ERROR_TAG, "IOException", e); batchSize = Math.max(batchSize / 2, 1);