Fixed RTM duplicated tasks with repeating tasks, priority not being set, and retried method invocation not working

pull/14/head
Tim Su 14 years ago
parent 9598ba52d4
commit 5cbd323bba

@ -176,6 +176,7 @@ public class Invoker {
} catch (InterruptedException e) { } catch (InterruptedException e) {
// ignore // ignore
} }
response.getEntity().consumeContent();
return invoke(true, params); return invoke(true, params);
} }

@ -59,7 +59,7 @@ public class RtmTask
High, Medium, Low, None; High, Medium, Low, None;
public static Priority values(Integer value) { public static Priority values(Integer value) {
value = Math.max(values().length - 1, value); value = Math.min(values().length - 1, value);
return values()[value]; return values()[value];
} }
} }

@ -485,7 +485,13 @@ public class MilkSyncProvider extends SyncProvider<MilkTaskContainer> {
if(remerge) { if(remerge) {
remote = pull(local); remote = pull(local);
remote.task.setId(local.task.getId()); remote.task.setId(local.task.getId());
write(remote);
// transform local into remote
local.task = remote.task;
local.listId = remote.listId;
local.taskId = remote.taskId;
local.repeating = remote.repeating;
local.taskSeriesId = remote.taskSeriesId;
} }
} }

Loading…
Cancel
Save