diff --git a/astrid/plugin-src/com/todoroo/astrid/subtasks/NewOrderedListUpdater.java b/astrid/plugin-src/com/todoroo/astrid/subtasks/NewOrderedListUpdater.java index 665c34352..6625629c7 100644 --- a/astrid/plugin-src/com/todoroo/astrid/subtasks/NewOrderedListUpdater.java +++ b/astrid/plugin-src/com/todoroo/astrid/subtasks/NewOrderedListUpdater.java @@ -64,25 +64,6 @@ public abstract class NewOrderedListUpdater { verifyTreeModel(list, filter); } - protected String serializedTreeFromFilter(Filter filter) { - JSONArray array = new JSONArray(); - TodorooCursor tasks = taskService.fetchFiltered(filter.getSqlQuery(), null, Task.ID); - try { - for (tasks.moveToFirst(); !tasks.isAfterLast(); tasks.moveToNext()) { - try { - JSONObject curr = new JSONObject(); - curr.put(Long.toString(tasks.getLong(0)), new JSONArray()); - array.put(curr); - } catch (JSONException e) { - e.printStackTrace(); - } - } - } finally { - tasks.close(); - } - return array.toString(); - } - private void verifyTreeModel(LIST list, Filter filter) { boolean addedThings = false; TodorooCursor tasks = taskService.fetchFiltered(filter.getSqlQuery(), null, Task.ID); diff --git a/astrid/plugin-src/com/todoroo/astrid/subtasks/SubtasksUpdater.java b/astrid/plugin-src/com/todoroo/astrid/subtasks/SubtasksUpdater.java index 41a86a89f..8961fed96 100644 --- a/astrid/plugin-src/com/todoroo/astrid/subtasks/SubtasksUpdater.java +++ b/astrid/plugin-src/com/todoroo/astrid/subtasks/SubtasksUpdater.java @@ -48,16 +48,12 @@ public class SubtasksUpdater extends NewOrderedListUpdater { String order; if (list == null) { order = Preferences.getStringValue(ACTIVE_TASKS_ORDER); - if (order == null) - order = "[]"; //$NON-NLS-1$ } else { order = list.getValue(TagData.TAG_ORDERING); } + if (order == null || "null".equals(order)) //$NON-NLS-1$ + order = "[]"; //$NON-NLS-1$ - if (order == null || "[]".equals(order)) { //$NON-NLS-1$ - order = serializedTreeFromFilter(filter); - writeSerialization(list, order); - } return order; }