From 2c5512341a8c87dfe4d37106a1ecc02784e84da6 Mon Sep 17 00:00:00 2001 From: Michael Strùˆder Date: Wed, 3 May 2017 14:54:32 +0200 Subject: prevent duplicate error messages when updating subjects --- todolist/app.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'todolist') 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.") } -- cgit v1.3