Load decorations if cached during fling

pull/14/head
Tim Su 14 years ago
parent 4d08a82344
commit 2bc25174e8

@ -334,21 +334,14 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
} }
// details and decorations, expanded // details and decorations, expanded
if(!isFling) {
decorationManager.request(viewHolder); decorationManager.request(viewHolder);
if(expanded == task.getId()) { if(!isFling && expanded == task.getId()) {
extendedDetailManager.request(viewHolder); extendedDetailManager.request(viewHolder);
taskActionManager.request(viewHolder); taskActionManager.request(viewHolder);
} else { } else {
viewHolder.extendedDetails.setVisibility(View.GONE); viewHolder.extendedDetails.setVisibility(View.GONE);
viewHolder.actions.setVisibility(View.GONE); viewHolder.actions.setVisibility(View.GONE);
} }
} else {
long taskId = viewHolder.task.getId();
decorationManager.reset(viewHolder, taskId);
viewHolder.extendedDetails.setVisibility(View.GONE);
viewHolder.actions.setVisibility(View.GONE);
}
} }
protected TaskRowListener listener = new TaskRowListener(); protected TaskRowListener listener = new TaskRowListener();
@ -610,7 +603,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
@Override @Override
Intent createBroadcastIntent(Task task) { Intent createBroadcastIntent(Task task) {
// performance hack, get rid of me when task list performance is improved // 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) task.getValue(Task.ELAPSED_SECONDS) == 0)
return null; return null;
intent.putExtra(AstridApiConstants.EXTRAS_TASK_ID, task.getId()); intent.putExtra(AstridApiConstants.EXTRAS_TASK_ID, task.getId());

Loading…
Cancel
Save