Fix some issues and remove unecessary code

pull/14/head
Sam Bosley 12 years ago
parent cbd2d92c0e
commit a0d7ac427c

@ -354,7 +354,6 @@ public abstract class AstridOrderedListUpdater<LIST> {
}
try {
tree.put(-1L);
recursivelySerialize(root, tree);
} catch (JSONException e) {
Log.e("OrderedListUpdater", "Error serializing tree model", e); //$NON-NLS-1$//$NON-NLS-2$
@ -362,7 +361,7 @@ public abstract class AstridOrderedListUpdater<LIST> {
return tree.toString();
}
public static void recursivelySerialize(Node node, JSONArray serializeTo) throws JSONException {
private static void recursivelySerialize(Node node, JSONArray serializeTo) throws JSONException {
ArrayList<Node> children = node.children;
serializeTo.put(node.taskId);
for (Node child : children) {

@ -2,9 +2,6 @@ package com.todoroo.astrid.subtasks;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import android.util.Log;
import com.todoroo.andlib.data.TodorooCursor;
@ -99,14 +96,7 @@ public class SubtasksMetadataMigration {
Node newNode = new Node(item.getValue(Metadata.TASK), parent, parent.indent + 1);
parent.children.add(newNode);
}
try {
JSONArray array = new JSONArray();
AstridOrderedListUpdater.recursivelySerialize(root, array);
return array.toString();
} catch (JSONException e) {
return "[]"; //$NON-NLS-1$
}
return AstridOrderedListUpdater.serializeTree(root);
}
private Node findNextParentForIndent(Node root, int indent) {

Loading…
Cancel
Save