From 3880639f93126e2e822411fdaabb57a4400cf619 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Thu, 1 Nov 2018 16:16:55 -0500 Subject: [PATCH] Clear caldav status and progress when incompleting --- app/src/main/java/org/tasks/caldav/CaldavConverter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/tasks/caldav/CaldavConverter.java b/app/src/main/java/org/tasks/caldav/CaldavConverter.java index bc0d8740b..5ea723d35 100644 --- a/app/src/main/java/org/tasks/caldav/CaldavConverter.java +++ b/app/src/main/java/org/tasks/caldav/CaldavConverter.java @@ -18,6 +18,7 @@ import net.fortuna.ical4j.model.Recur; import net.fortuna.ical4j.model.property.Completed; import net.fortuna.ical4j.model.property.Due; import net.fortuna.ical4j.model.property.RRule; +import net.fortuna.ical4j.model.property.Status; import org.tasks.data.CaldavTask; import timber.log.Timber; @@ -130,10 +131,12 @@ public class CaldavConverter { } if (task.isCompleted()) { remote.setCompletedAt(new Completed(new DateTime(task.getCompletionDate()))); + remote.setStatus(Status.VTODO_COMPLETED); remote.setPercentComplete(100); } else if (remote.getCompletedAt() != null) { remote.setCompletedAt(null); - remote.setPercentComplete(0); + remote.setStatus(null); + remote.setPercentComplete(null); } if (task.isRecurring()) { try {