|
|
|
@ -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<Long> tagsThatNeedOrderingSync = new HashSet<Long>();
|
|
|
|
|
final Set<Long> tasksThatNeedTagSync = new HashSet<Long>();
|
|
|
|
|
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 {
|
|
|
|
|