Workaround for switching to active tasks after deleting a list from settings

pull/14/head
Sam Bosley 12 years ago
parent 98f4cec2e7
commit 48322a9bbf

@ -101,6 +101,8 @@ public class TagViewFragment extends TaskListFragment {
private Filter originalFilter;
private boolean justDeleted = false;
//private ImageAdapter galleryAdapter;
// --- UI initialization
@ -465,6 +467,17 @@ public class TagViewFragment extends TaskListFragment {
@Override
public void onResume() {
if (justDeleted) {
// tag was deleted locally in settings
// go back to active tasks
FilterListFragment fl = ((AstridActivity) getActivity()).getFilterListFragment();
if (fl != null) {
fl.switchToActiveTasks();
fl.clear(); // Should auto refresh
}
return;
}
super.onResume();
IntentFilter intentFilter = new IntentFilter(BROADCAST_TAG_ACTIVITY);
@ -489,13 +502,7 @@ public class TagViewFragment extends TaskListFragment {
// This can happen if a tag has been deleted as part of a sync
return;
} else if (tagData.isDeleted()) {
// tag was deleted locally in settings
// go back to active tasks
FilterListFragment fl = ((AstridActivity) getActivity()).getFilterListFragment();
if (fl != null) {
fl.switchToActiveTasks();
fl.clear(); // Should auto refresh
}
justDeleted = true;
return;
}
filter = TagFilterExposer.filterFromTagData(getActivity(), tagData);

Loading…
Cancel
Save