Fix finishing recurrence

pull/2851/head
Alex Baker 4 weeks 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,11 +84,14 @@ class TaskCompleter @Inject internal constructor(
if (caldavDao.getAccountForTask(task.id)?.isSuppressRepeatingTasks != true) {
repeatTaskHelper.handleRepeat(task)
if (task.completionDate == 0L) {
// un-complete children
setComplete(task, false)
}
}
}
}
}
if (completed && notificationManager.currentInterruptionFilter == INTERRUPTION_FILTER_ALL) {
preferences
.completionSound

Loading…
Cancel
Save