From 2bc25174e857fb77dd874134942215c303cc37bb Mon Sep 17 00:00:00 2001 From: Tim Su Date: Fri, 17 Sep 2010 14:56:14 +0800 Subject: [PATCH] Load decorations if cached during fling --- .../com/todoroo/astrid/adapter/TaskAdapter.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java index 16697d2e7..cf5db7cc7 100644 --- a/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java +++ b/astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java @@ -334,18 +334,11 @@ public class TaskAdapter extends CursorAdapter implements Filterable { } // details and decorations, expanded - if(!isFling) { - decorationManager.request(viewHolder); - if(expanded == task.getId()) { - extendedDetailManager.request(viewHolder); - taskActionManager.request(viewHolder); - } else { - viewHolder.extendedDetails.setVisibility(View.GONE); - viewHolder.actions.setVisibility(View.GONE); - } + decorationManager.request(viewHolder); + if(!isFling && expanded == task.getId()) { + extendedDetailManager.request(viewHolder); + taskActionManager.request(viewHolder); } else { - long taskId = viewHolder.task.getId(); - decorationManager.reset(viewHolder, taskId); viewHolder.extendedDetails.setVisibility(View.GONE); viewHolder.actions.setVisibility(View.GONE); } @@ -610,7 +603,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable { @Override Intent createBroadcastIntent(Task task) { // performance hack, get rid of me when task list performance is improved - if(task.getValue(Task.TIMER_START) == 0 && + if(isFling || task.getValue(Task.TIMER_START) == 0 && task.getValue(Task.ELAPSED_SECONDS) == 0) return null; intent.putExtra(AstridApiConstants.EXTRAS_TASK_ID, task.getId());