Fixed a bug with how TaskListActivity handled constructing a default filter

pull/14/head
Sam Bosley 13 years ago
parent 579ac9d069
commit ed769347e0

@ -33,7 +33,8 @@ public class PeopleViewActivity extends TaskListActivity {
@Override @Override
protected Filter getDefaultFilter() { protected Filter getDefaultFilter() {
return PeopleFilterExposer.mySharedTasks(this); Filter defaultFilter = PeopleFilterExposer.mySharedTasks(this);
return defaultFilter;
} }
@Override @Override

@ -176,6 +176,9 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
if (extras != null) if (extras != null)
extras = (Bundle) extras.clone(); extras = (Bundle) extras.clone();
if (extras == null)
extras = new Bundle();
Filter savedFilter = getIntent().getParcelableExtra(TaskListFragment.TOKEN_FILTER); Filter savedFilter = getIntent().getParcelableExtra(TaskListFragment.TOKEN_FILTER);
if (Intent.ACTION_SEARCH.equals(getIntent().getAction())) { if (Intent.ACTION_SEARCH.equals(getIntent().getAction())) {
String query = getIntent().getStringExtra(SearchManager.QUERY).trim(); String query = getIntent().getStringExtra(SearchManager.QUERY).trim();
@ -187,11 +190,11 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
null); null);
} }
if (savedFilter == null) if (savedFilter == null) {
savedFilter = getDefaultFilter(); savedFilter = getDefaultFilter();
extras.putAll(configureIntentAndExtrasWithFilter(getIntent(), savedFilter));
}
if (extras == null)
extras = new Bundle();
extras.putParcelable(TaskListFragment.TOKEN_FILTER, savedFilter); extras.putParcelable(TaskListFragment.TOKEN_FILTER, savedFilter);
if (swipeIsEnabled()) { if (swipeIsEnabled()) {

Loading…
Cancel
Save