diff --git a/app/src/main/java/keijumt/todoapp/addtask/AddEditTaskViewModel.kt b/app/src/main/java/keijumt/todoapp/addtask/AddEditTaskViewModel.kt index 72dcc9a..8a89621 100644 --- a/app/src/main/java/keijumt/todoapp/addtask/AddEditTaskViewModel.kt +++ b/app/src/main/java/keijumt/todoapp/addtask/AddEditTaskViewModel.kt @@ -5,7 +5,6 @@ import keijumt.todoapp.data.db.entity.Task import keijumt.todoapp.data.repository.TaskRepository import keijumt.todoapp.databinding.SingleLiveEvent -import java.util.* import javax.inject.Inject /** @@ -21,7 +20,10 @@ val taskAddEvent = SingleLiveEvent() fun onClickSave() { - val task = Task(taskTitle.get(), taskDetails.get(), Calendar.getInstance().timeInMillis, Calendar.getInstance().timeInMillis) + val task = Task( + title = taskTitle.get(), + details = taskDetails.get() + ) repository.save(task) taskAddEvent.call() }