|
|
@ -129,6 +129,7 @@ public class OrderedListFragmentHelper<LIST> {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void drop(int from, int to) {
|
|
|
|
public void drop(int from, int to) {
|
|
|
|
long targetTaskId = taskAdapter.getItemId(from);
|
|
|
|
long targetTaskId = taskAdapter.getItemId(from);
|
|
|
|
|
|
|
|
if (targetTaskId <= 0) return; // This can happen with gestures on empty parts of the list (e.g. extra space below tasks)
|
|
|
|
long destinationTaskId = taskAdapter.getItemId(to);
|
|
|
|
long destinationTaskId = taskAdapter.getItemId(to);
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -158,6 +159,7 @@ public class OrderedListFragmentHelper<LIST> {
|
|
|
|
|
|
|
|
|
|
|
|
protected void indent(int which, int delta) {
|
|
|
|
protected void indent(int which, int delta) {
|
|
|
|
long targetTaskId = taskAdapter.getItemId(which);
|
|
|
|
long targetTaskId = taskAdapter.getItemId(which);
|
|
|
|
|
|
|
|
if (targetTaskId <= 0) return; // This can happen with gestures on empty parts of the list (e.g. extra space below tasks)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
updater.indent(getFilter(), list, targetTaskId, delta);
|
|
|
|
updater.indent(getFilter(), list, targetTaskId, delta);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|