Code cleanup

pull/1188/head
supermazena 5 years ago committed by Alex Baker
parent d4f3438eed
commit dc615b6c51

@ -68,12 +68,14 @@ class TaskDuplicator @Inject constructor(
}
gcalHelper.createTaskEventIfEnabled(clone)
taskDao.save(clone, null) // TODO: delete me
getDirectChildren(originalId)
.filter { it.parent == originalId }
.forEach { subtask -> clone(subtask, newId) }
getDirectChildren(originalId).forEach { subtask ->
clone(subtask, newId)
}
return clone
}
private suspend fun getDirectChildren(taskId: Long): List<Task> =
taskDao.fetch(taskDao.getChildren(taskId)).filter { it.parent == taskId }
taskDao
.fetch(taskDao.getChildren(taskId))
.filter { it.parent == taskId }
}
Loading…
Cancel
Save