diff --git a/app/src/googleplay/java/com/todoroo/astrid/gtasks/OrderedMetadataListFragmentHelper.java b/app/src/googleplay/java/com/todoroo/astrid/gtasks/OrderedMetadataListFragmentHelper.java index 0628808dc..0fd76b0bc 100644 --- a/app/src/googleplay/java/com/todoroo/astrid/gtasks/OrderedMetadataListFragmentHelper.java +++ b/app/src/googleplay/java/com/todoroo/astrid/gtasks/OrderedMetadataListFragmentHelper.java @@ -85,12 +85,12 @@ class OrderedMetadataListFragmentHelper { if (targetTaskId <= 0) { return; // This can happen with gestures on empty parts of the list (e.g. extra space below tasks) } - long destinationTaskId = taskAdapter.getTaskId(to); try { if(to >= taskAdapter.getCount()) { updater.moveTo(list, targetTaskId, -1); } else { + long destinationTaskId = taskAdapter.getTaskId(to); updater.moveTo(list, targetTaskId, destinationTaskId); } } catch (Exception e) { diff --git a/app/src/main/java/com/todoroo/astrid/subtasks/AstridOrderedListFragmentHelper.java b/app/src/main/java/com/todoroo/astrid/subtasks/AstridOrderedListFragmentHelper.java index 3ebd1e568..70e5addbf 100644 --- a/app/src/main/java/com/todoroo/astrid/subtasks/AstridOrderedListFragmentHelper.java +++ b/app/src/main/java/com/todoroo/astrid/subtasks/AstridOrderedListFragmentHelper.java @@ -77,12 +77,12 @@ class AstridOrderedListFragmentHelper { if (!Task.isValidUuid(targetTaskId)) { return; // This can happen with gestures on empty parts of the list (e.g. extra space below tasks) } - String destinationTaskId = taskAdapter.getItemUuid(to); try { if(to >= taskAdapter.getCount()) { updater.moveTo(list, fragment.getFilter(), targetTaskId, "-1"); //$NON-NLS-1$ } else { + String destinationTaskId = taskAdapter.getItemUuid(to); updater.moveTo(list, fragment.getFilter(), targetTaskId, destinationTaskId); } } catch (Exception e) {