|
|
@ -143,10 +143,11 @@ public class GtasksSyncV2Provider extends SyncV2Provider {
|
|
|
|
private synchronized void pushUpdated(GtasksInvoker invoker, SyncResultCallback callback) {
|
|
|
|
private synchronized void pushUpdated(GtasksInvoker invoker, SyncResultCallback callback) {
|
|
|
|
TodorooCursor<Task> queued = taskService.query(Query.select(Task.PROPERTIES).
|
|
|
|
TodorooCursor<Task> queued = taskService.query(Query.select(Task.PROPERTIES).
|
|
|
|
join(Join.left(Metadata.TABLE, Task.ID.eq(Metadata.TASK))).where(
|
|
|
|
join(Join.left(Metadata.TABLE, Task.ID.eq(Metadata.TASK))).where(
|
|
|
|
|
|
|
|
Criterion.and(Task.USER_ID.eq(Task.USER_ID_SELF),
|
|
|
|
Criterion.or(
|
|
|
|
Criterion.or(
|
|
|
|
Criterion.and(MetadataCriteria.withKey(GtasksMetadata.METADATA_KEY),
|
|
|
|
Criterion.and(MetadataCriteria.withKey(GtasksMetadata.METADATA_KEY),
|
|
|
|
Task.MODIFICATION_DATE.gt(GtasksMetadata.LAST_SYNC)),
|
|
|
|
Task.MODIFICATION_DATE.gt(GtasksMetadata.LAST_SYNC)),
|
|
|
|
Metadata.KEY.isNull())));
|
|
|
|
Metadata.KEY.isNull()))));
|
|
|
|
callback.incrementMax(queued.getCount() * 10);
|
|
|
|
callback.incrementMax(queued.getCount() * 10);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Task task = new Task();
|
|
|
|
Task task = new Task();
|
|
|
|