From e39b1f74a902153443836f5fced427e70c8e6eb5 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 3 Feb 2012 17:20:19 -0800 Subject: [PATCH] Refresh filter list after tag delete --- .../com/todoroo/astrid/activity/TaskListActivity.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index 509b18a9e..16e06b0e4 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -305,7 +305,6 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener @Override protected void onStop() { super.onStop(); - System.err.println("Unregistering"); unregisterReceiver(tagDeletedReceiver); } @@ -390,12 +389,13 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener @Override public void onReceive(Context context, Intent intent) { String deletedTag = intent.getStringExtra(TagViewFragment.EXTRA_TAG_NAME); - String currentlyShowing = getIntent().getStringExtra(TagViewFragment.EXTRA_TAG_NAME); - if (currentlyShowing != null && currentlyShowing.equals(deletedTag)) { - FilterListFragment fl = getFilterListFragment(); - if (fl != null) { + FilterListFragment fl = getFilterListFragment(); + if (fl != null) { + String currentlyShowing = getIntent().getStringExtra(TagViewFragment.EXTRA_TAG_NAME); + if (currentlyShowing != null && currentlyShowing.equals(deletedTag)) { fl.switchToActiveTasks(); } + fl.clear(); // Should auto refresh } }