From 7a655f04bb26bdb5c7a5364bb28c5486ddb38d5a Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 28 Feb 2013 13:32:19 -0800 Subject: [PATCH] All TLM entries created on migration should be synced, since we will need to get real UUIDs for them and/or create them at some point --- .../com/todoroo/astrid/actfm/EditPeopleControlSet.java | 2 -- .../todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java b/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java index 44683af08..9ca985c9a 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java @@ -373,13 +373,11 @@ public class EditPeopleControlSet extends PopupControlSet { private String getLongOrStringId(JSONObject obj, String defaultValue) { try { long value = obj.getLong("id"); //$NON-NLS-1$ - System.err.println("RETURNING VALUE: " + value); return Long.toString(value); } catch (JSONException e) { String value = obj.optString("id"); //$NON-NLS-1$ if (TextUtils.isEmpty(value)) value = defaultValue; - System.err.println("RETURNING VALUE: " + value); return value; } } diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java index eaea97034..e2591d159 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java @@ -133,7 +133,6 @@ public class AstridNewSyncMigrator { // -------------- // Then ensure that every remote model has a remote id, by generating one using the uuid generator for all those without one // -------------- - final Set tagsThatNeedOrderingSync = new HashSet(); final Set tasksThatNeedTagSync = new HashSet(); try { Query tagsQuery = Query.select(TagData.ID, TagData.UUID, TagData.MODIFICATION_DATE).where(Criterion.or(TagData.UUID.eq(RemoteModel.NO_UUID), TagData.UUID.isNull())); @@ -150,10 +149,7 @@ public class AstridNewSyncMigrator { } @Override - public void afterSave(TagData instance, boolean createdOutstanding) { - if (createdOutstanding) - tagsThatNeedOrderingSync.add(instance.getId()); - } + public void afterSave(TagData instance, boolean createdOutstanding) {/**/} }); Query tasksQuery = Query.select(Task.ID, Task.UUID, Task.RECURRENCE, Task.FLAGS, Task.MODIFICATION_DATE, Task.LAST_SYNC).where(Criterion.all); @@ -350,8 +346,6 @@ public class AstridNewSyncMigrator { tlm.setValue(TaskListMetadata.TASK_IDS, tagOrdering); tlm.setValue(TaskListMetadata.TAG_UUID, td.getUuid()); - if (!tagsThatNeedOrderingSync.contains(td.getId())) - tlm.putTransitory(SyncFlags.ACTFM_SUPPRESS_OUTSTANDING_ENTRIES, true); taskListMetadataDao.createNew(tlm); } } finally {