Set CalDAV completion percentage

pull/757/head
Alex Baker 6 years ago
parent 829f849603
commit e9a5baabee

@ -128,8 +128,13 @@ public class CaldavConverter {
} else {
remote.setDue(null);
}
remote.setCompletedAt(
task.isCompleted() ? new Completed(new DateTime(task.getCompletionDate())) : null);
if (task.isCompleted()) {
remote.setCompletedAt(new Completed(new DateTime(task.getCompletionDate())));
remote.setPercentComplete(100);
} else if (remote.getCompletedAt() != null) {
remote.setCompletedAt(null);
remote.setPercentComplete(0);
}
if (task.isRecurring()) {
try {
String rrule = task.getRecurrenceWithoutFrom().replace("RRULE:", "");

Loading…
Cancel
Save