Fix finishing recurrence

pull/2851/head
Alex Baker 7 months ago
parent 26aa916c20
commit c210fe1893

@ -81,7 +81,11 @@ class RepeatTaskHelper @Inject constructor(
}
suspend fun undoRepeat(task: Task, oldDueDate: Long) {
task.completionDate = 0L
if (task.completionDate > 0) {
task.completionDate = 0
taskDao.save(task)
return
}
try {
val recur = newRecur(task.recurrence!!)
val count = recur.count

@ -84,7 +84,10 @@ class TaskCompleter @Inject internal constructor(
if (caldavDao.getAccountForTask(task.id)?.isSuppressRepeatingTasks != true) {
repeatTaskHelper.handleRepeat(task)
setComplete(task, false)
if (task.completionDate == 0L) {
// un-complete children
setComplete(task, false)
}
}
}
}

Loading…
Cancel
Save