|
|
@ -258,9 +258,13 @@ public class GtasksSyncV2Provider extends SyncV2Provider {
|
|
|
|
// merge astrid dates with google dates
|
|
|
|
// merge astrid dates with google dates
|
|
|
|
if(task.task.isSaved()) {
|
|
|
|
if(task.task.isSaved()) {
|
|
|
|
Task local = PluginServices.getTaskService().fetchById(task.task.getId(), Task.DUE_DATE, Task.COMPLETION_DATE);
|
|
|
|
Task local = PluginServices.getTaskService().fetchById(task.task.getId(), Task.DUE_DATE, Task.COMPLETION_DATE);
|
|
|
|
mergeDates(task.task, local);
|
|
|
|
if (local == null) {
|
|
|
|
if(task.task.isCompleted() && !local.isCompleted())
|
|
|
|
task.task.clearValue(Task.ID);
|
|
|
|
StatisticsService.reportEvent(StatisticsConstants.GTASKS_TASK_COMPLETED);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
mergeDates(task.task, local);
|
|
|
|
|
|
|
|
if(task.task.isCompleted() && !local.isCompleted())
|
|
|
|
|
|
|
|
StatisticsService.reportEvent(StatisticsConstants.GTASKS_TASK_COMPLETED);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else { // Set default reminders for remotely created tasks
|
|
|
|
} else { // Set default reminders for remotely created tasks
|
|
|
|
TaskDao.setDefaultReminders(task.task);
|
|
|
|
TaskDao.setDefaultReminders(task.task);
|
|
|
|
}
|
|
|
|
}
|
|
|
|