/**
* Creates a new task with the given details fields.
*
* <p>Sends the {@link CreateBasicTask} command through the {@linkplain #client() gRPC client}.
*
* @param description the new task description
*/
void createTask(String description, TaskPriority priority, Timestamp taskDueDate) {
final TaskDescription taskDescription = TaskDescription.newBuilder()
.setValue(description)
.build();
final SetTaskDetails command = SetTaskDetails.newBuilder()
.setId(wizardId)
.setDescription(taskDescription)
.setPriority(priority)
.setDueDate(taskDueDate)
.build();
post(command);
this.taskDescription = taskDescription;
this.taskPriority = priority;
this.taskDueDate = taskDueDate;
}
NewTaskViewModel.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:todo-list
作者:
评论列表
文章目录