diff options
| author | Michael Strùˆder <mikezter@gmail.com> | 2017-05-03 14:54:32 +0200 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2017-05-09 20:20:24 -0400 |
| commit | 2c5512341a8c87dfe4d37106a1ecc02784e84da6 (patch) | |
| tree | c43a2d76129d125beb7bc725e64597b1f41e068d | |
| parent | 950aabce192d6dd15eee60717a510be2bb4f9c7c (diff) | |
prevent duplicate error messages when updating subjects
| -rw-r--r-- | todolist/app.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/todolist/app.go b/todolist/app.go index 6d771ef..1e9f699 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -93,12 +93,15 @@ func (a *App) UnarchiveTodo(input string) { func (a *App) EditTodoSubject(input string) { a.Load() + _, id, subject := Parser{input}.Parse() - id, todo := a.getId(input) if id == -1 { return } + + _, todo := a.getId(input) todo.Subject = subject + a.Save() fmt.Println("Todo subject updated.") } |
