Preserve subtasks when moving from edit screen

gtask_related_email
Alex Baker 5 years ago
parent 84e954232b
commit e1efcd3e9c

@ -4,6 +4,7 @@ import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Lists.transform;
import static com.todoroo.andlib.utility.DateUtilities.now;
import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
import com.todoroo.astrid.api.CaldavFilter;
import com.todoroo.astrid.api.Filter;
@ -45,6 +46,10 @@ public class TaskMover {
this.preferences = preferences;
}
public void move(Long task, Filter selectedList) {
move(singletonList(task), selectedList);
}
public void move(List<Long> tasks, Filter selectedList) {
tasks = newArrayList(tasks);
tasks.removeAll(googleTaskDao.findChildrenInList(tasks));
@ -61,10 +66,6 @@ public class TaskMover {
syncAdapters.sync();
}
public void move(Task task, Filter selectedList) {
performMove(task, selectedList);
}
public Filter getSingleFilter(List<Long> tasks) {
List<String> caldavCalendars = caldavDao.getCalendars(tasks);
List<String> googleTaskLists = googleTaskDao.getLists(tasks);

@ -145,7 +145,7 @@ public class RemoteListFragment extends TaskEditControlFragment {
@Override
public void apply(Task task) {
taskMover.move(task, selectedList);
taskMover.move(task.getId(), selectedList);
}
@Override

Loading…
Cancel
Save