Add getChildren overload

gtask_related_email
Alex Baker 6 years ago
parent 48fdba8884
commit 415ce8030a

@ -37,7 +37,7 @@ public class TaskCompleter {
long completionDate = completed ? now() : 0L;
setComplete(singletonList(item), completionDate);
setComplete(googleTaskDao.getChildTasks(item.getId()), completionDate);
List<Long> caldavChildren = caldavDao.getChildren(singletonList(item.getId()));
List<Long> caldavChildren = caldavDao.getChildren(item.getId());
if (!caldavChildren.isEmpty()) {
setComplete(taskDao.fetch(caldavChildren), completionDate);
}

@ -117,6 +117,10 @@ public abstract class CaldavDao {
@Query("UPDATE caldav_tasks SET cd_parent = IFNULL((SELECT cd_task FROM caldav_tasks AS p WHERE p.cd_remote_id = caldav_tasks.cd_remote_parent), cd_parent) WHERE cd_calendar = :calendar AND cd_remote_parent IS NOT NULL and cd_remote_parent != ''")
public abstract void updateParents(String calendar);
public List<Long> getChildren(long id) {
return getChildren(Collections.singletonList(id));
}
public List<Long> getChildren(List<Long> ids) {
return atLeastLollipop()
? getChildrenRecursive(ids)

Loading…
Cancel
Save