From 4d520c19bf9def24996813a7af13cdca72aa182e Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Tue, 18 Sep 2012 15:25:33 -0700 Subject: [PATCH] No more of this crazy custom filter nonsense when assigning a task --- .../astrid/activity/TaskListFragment.java | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java index 0ad979457..bab0f8feb 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java @@ -82,7 +82,6 @@ import com.todoroo.astrid.core.CoreFilterExposer; import com.todoroo.astrid.core.CustomFilterActivity; import com.todoroo.astrid.core.SortHelper; import com.todoroo.astrid.dao.Database; -import com.todoroo.astrid.dao.TaskDao.TaskCriteria; import com.todoroo.astrid.data.Metadata; import com.todoroo.astrid.data.TagData; import com.todoroo.astrid.data.Task; @@ -973,7 +972,6 @@ public class TaskListFragment extends ListFragment implements OnScrollListener, * * @param withCustomId */ - @SuppressWarnings("nls") public void selectCustomId(long withCustomId) { // if already in the list, select it TodorooCursor currentCursor = (TodorooCursor) taskAdapter.getCursor(); @@ -984,33 +982,6 @@ public class TaskListFragment extends ListFragment implements OnScrollListener, return; } } - - // create a custom cursor - if (!sqlQueryTemplate.get().contains("WHERE")) - sqlQueryTemplate.set(sqlQueryTemplate.get() + " WHERE " - + TaskCriteria.byId(withCustomId)); - else - sqlQueryTemplate.set(sqlQueryTemplate.get().replace("WHERE ", - "WHERE " + TaskCriteria.byId(withCustomId) + " OR ")); - - currentCursor = taskService.fetchFiltered(sqlQueryTemplate.get(), null, - taskProperties()); - getListView().setFilterText(""); - - taskAdapter.changeCursor(currentCursor); - - // update title - if (getActivity() instanceof TaskListActivity) - ((TaskListActivity) getActivity()).setListsTitle(getString(R.string.TLA_custom)); - - // try selecting again - for (int i = 0; i < currentCursor.getCount(); i++) { - currentCursor.moveToPosition(i); - if (currentCursor.get(Task.ID) == withCustomId) { - getListView().setSelection(i); - break; - } - } } private void showTaskCreateHelpPopover() {