|
|
|
@ -130,10 +130,12 @@ public class GtasksTaskListUpdater {
|
|
|
|
root.children.add(target);
|
|
|
|
root.children.add(target);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Node sibling = findNode(root, moveBeforeTaskId);
|
|
|
|
Node sibling = findNode(root, moveBeforeTaskId);
|
|
|
|
|
|
|
|
if(sibling != null) {
|
|
|
|
int index = sibling.parent.children.indexOf(sibling);
|
|
|
|
int index = sibling.parent.children.indexOf(sibling);
|
|
|
|
target.parent.children.remove(target);
|
|
|
|
target.parent.children.remove(target);
|
|
|
|
sibling.parent.children.add(index, target);
|
|
|
|
sibling.parent.children.add(index, target);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
traverseTreeAndWriteValues(root, new AtomicInteger(0), -1);
|
|
|
|
traverseTreeAndWriteValues(root, new AtomicInteger(0), -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|