From 0c523ed1507d13543bfc2a079673fc235e14653f Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Mon, 16 Jan 2012 11:42:15 -0800 Subject: [PATCH] Directly replace contents of list when filter is clicked regardless of number of fragments --- .../activity/AstridWrapperActivity.java | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java b/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java index 27f470713..23a37a88d 100644 --- a/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/AstridWrapperActivity.java @@ -88,31 +88,9 @@ public class AstridWrapperActivity extends FragmentActivity if (this instanceof TaskListWrapperActivity && (item instanceof Filter) ) { ((TaskListWrapperActivity) this).setSelectedItem((Filter) item); } - if (!mMultipleFragments || (item instanceof SearchFilter)) { - if(item instanceof Filter) { - Filter filter = (Filter)item; - if(filter instanceof FilterWithCustomIntent) { - FilterWithCustomIntent customFilter = ((FilterWithCustomIntent)filter); - customFilter.start(this, FilterListActivity.REQUEST_VIEW_TASKS); - } else { - Intent intent = new Intent(this, TaskListWrapperActivity.class); - intent.putExtra(TaskListActivity.TOKEN_FILTER, filter); - intent.putExtra(TaskListActivity.TOKEN_OVERRIDE_ANIM, true); - startActivityForResult(intent, FilterListActivity.REQUEST_VIEW_TASKS); - } - AndroidUtilities.callOverridePendingTransition(this, R.anim.slide_left_in, R.anim.slide_left_out); - StatisticsService.reportEvent(StatisticsConstants.FILTER_LIST); - return true; - } else if(item instanceof SearchFilter) { - onSearchRequested(); - StatisticsService.reportEvent(StatisticsConstants.FILTER_SEARCH); - } else if(item instanceof IntentFilter) { - try { - ((IntentFilter)item).intent.send(); - } catch (CanceledException e) { - // ignore - } - } + if (item instanceof SearchFilter) { + onSearchRequested(); + StatisticsService.reportEvent(StatisticsConstants.FILTER_SEARCH); return false; } else { // If showing both fragments, directly update the tasklist-fragment