After making changes to task due dates, reminders for that task should be rescheduled

pull/14/head
Sam Bosley 12 years ago
parent 6576822d30
commit f31057dc3d

@ -32,8 +32,10 @@ import com.todoroo.astrid.data.RemoteModel;
import com.todoroo.astrid.data.SyncFlags; import com.todoroo.astrid.data.SyncFlags;
import com.todoroo.astrid.data.TagData; import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.TagMetadata; import com.todoroo.astrid.data.TagMetadata;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.TaskListMetadata; import com.todoroo.astrid.data.TaskListMetadata;
import com.todoroo.astrid.data.UserActivity; import com.todoroo.astrid.data.UserActivity;
import com.todoroo.astrid.reminders.ReminderService;
import com.todoroo.astrid.service.MetadataService; import com.todoroo.astrid.service.MetadataService;
import com.todoroo.astrid.tags.TagService; import com.todoroo.astrid.tags.TagService;
import com.todoroo.astrid.tags.TaskToTagMetadata; import com.todoroo.astrid.tags.TaskToTagMetadata;
@ -231,6 +233,12 @@ public class MakeChanges<TYPE extends RemoteModel> extends ServerToClientMessage
uuidChanged(oldUuid, uuid); uuidChanged(oldUuid, uuid);
} }
if (changes.has(NameMaps.localPropertyToServerColumnName(NameMaps.TABLE_ID_TASKS, Task.DUE_DATE))) {
Task t = PluginServices.getTaskDao().fetch(uuid, Task.PROPERTIES);
if (t != null)
ReminderService.getInstance().scheduleAlarm(t);
}
JSONArray addTags = changes.optJSONArray("tag_added"); JSONArray addTags = changes.optJSONArray("tag_added");
JSONArray removeTags = changes.optJSONArray("tag_removed"); JSONArray removeTags = changes.optJSONArray("tag_removed");
boolean tagsAdded = (addTags != null && addTags.length() > 0); boolean tagsAdded = (addTags != null && addTags.length() > 0);

Loading…
Cancel
Save