From f16108d35fcd7a299e6630f12c2541b7822f55b7 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 19 Sep 2012 12:50:10 -0700 Subject: [PATCH] Fixed a completed tasks display bug --- .../src/com/todoroo/astrid/adapter/TaskAdapter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java index 46523bed0..ea751267d 100644 --- a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java +++ b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java @@ -1029,6 +1029,12 @@ public class TaskAdapter extends CursorAdapter implements Filterable { return; boolean state = task.isCompleted(); + // show item as completed if it was recently checked + if(completedItems.get(task.getId()) != null) { + task.setValue(Task.COMPLETION_DATE, + completedItems.get(task.getId()) ? DateUtilities.now() : 0); + } + setupDueDateAndTags(viewHolder, task); TextView name = viewHolder.nameView; @@ -1088,12 +1094,6 @@ public class TaskAdapter extends CursorAdapter implements Filterable { // complete box final CheckableImageView checkBoxView = viewHolder.completeBox; { - - // show item as completed if it was recently checked - if(completedItems.get(task.getId()) != null) { - task.setValue(Task.COMPLETION_DATE, - completedItems.get(task.getId()) ? DateUtilities.now() : 0); - } checkBoxView.setChecked(task.isCompleted()); // disable checkbox if task is readonly checkBoxView.setEnabled(!viewHolder.task.getFlag(Task.FLAGS, Task.FLAG_IS_READONLY));