From f081c83b8bdbd78b7052680845b833c9c871cdfb Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Fri, 17 Apr 2015 16:56:06 -0500 Subject: [PATCH] Register/deregister geofences on deletion change --- src/main/java/com/todoroo/astrid/dao/TaskDao.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/todoroo/astrid/dao/TaskDao.java b/src/main/java/com/todoroo/astrid/dao/TaskDao.java index 089662c28..029b4d259 100644 --- a/src/main/java/com/todoroo/astrid/dao/TaskDao.java +++ b/src/main/java/com/todoroo/astrid/dao/TaskDao.java @@ -359,10 +359,13 @@ public class TaskDao { task.markSaved(); boolean completionDateModified = values.containsKey(Task.COMPLETION_DATE.name); + boolean deletionDateModified = values.containsKey(Task.DELETION_DATE.name); if(completionDateModified && task.isCompleted()) { afterComplete(task); + } else if (deletionDateModified && task.isDeleted()) { + afterComplete(task); } else { - if (completionDateModified) { + if (completionDateModified || deletionDateModified) { geofenceService.setupGeofences(task.getId()); } if(values.containsKey(Task.DUE_DATE.name) ||