Fix tasker task creator

pull/757/head
Alex Baker 6 years ago
parent cb8e0f10f0
commit 49fe296a61

@ -80,17 +80,9 @@ public class TaskCreator {
}
public Task basicQuickAddTask(String title) {
return createWithValues(null, title);
}
/**
* Create task from the given content values, saving it. This version doesn't need to start with a
* base task model.
*/
public Task createWithValues(Map<String, Object> values, String title) {
title = title.trim();
Task task = create(values, title);
Task task = createWithValues(null, title);
taskDao.createNew(task);
boolean gcalCreateEventEnabled =
@ -123,7 +115,11 @@ public class TaskCreator {
return task;
}
private Task create(Map<String, Object> values, String title) {
/**
* Create task from the given content values, saving it. This version doesn't need to start with a
* base task model.
*/
public Task createWithValues(Map<String, Object> values, String title) {
Task task = new Task();
task.setCreationDate(now());
task.setModificationDate(now());

@ -30,7 +30,7 @@ public class TaskerTaskCreator {
}
public void handle(TaskCreationBundle bundle) {
Task task = taskCreator.createWithValues(null, bundle.getTitle());
Task task = taskCreator.basicQuickAddTask(bundle.getTitle());
String dueDateString = bundle.getDueDate();
if (!isNullOrEmpty(dueDateString)) {
@ -72,8 +72,7 @@ public class TaskerTaskCreator {
task.setNotes(bundle.getDescription());
taskDao.createNew(task);
taskDao.save(task, null); // TODO: delete me
taskDao.save(task);
taskCreator.createTags(task);
}

Loading…
Cancel
Save