From 24fd1acb68908ce6255d7528ac6585091b6cc6b6 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Wed, 29 Jul 2020 14:32:01 -0500 Subject: [PATCH] Only call after complete for calendars/recurring --- app/src/main/java/com/todoroo/astrid/dao/TaskDao.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/todoroo/astrid/dao/TaskDao.kt b/app/src/main/java/com/todoroo/astrid/dao/TaskDao.kt index f41439c0e..ee751b69b 100644 --- a/app/src/main/java/com/todoroo/astrid/dao/TaskDao.kt +++ b/app/src/main/java/com/todoroo/astrid/dao/TaskDao.kt @@ -87,8 +87,8 @@ class TaskDao @Inject constructor( val deletionDateModified = task.deletionDate != original?.deletionDate ?: 0 val justCompleted = completionDateModified && task.isCompleted val justDeleted = deletionDateModified && task.isDeleted - if (justCompleted) { - workManager.afterComplete(task, original) + if (justCompleted && (task.isRecurring || !task.calendarURI.isNullOrBlank())) { + workManager.afterComplete(task) } if (justCompleted || justDeleted) {