diff options
| author | Michael Strùˆder <mikezter@gmail.com> | 2017-05-04 23:55:43 +0200 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2017-05-09 20:20:24 -0400 |
| commit | 54aaabdbe16986e6e6071dda1eeee6f73ae39400 (patch) | |
| tree | c37b0548379f45cbfe0681439c52291a60014515 | |
| parent | 87e2fe7dbfcb2026662b50524d5d9eec766d8308 (diff) | |
parse Projects and Contexts when editing subject
| -rw-r--r-- | todolist/app.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/todolist/app.go b/todolist/app.go index 5f4d08f..12cc39d 100644 --- a/todolist/app.go +++ b/todolist/app.go @@ -94,7 +94,8 @@ func (a *App) UnarchiveTodo(input string) { func (a *App) EditTodoSubject(input string) { a.Load() - _, id, subject := Parser{input}.Parse() + p := Parser{input} + _, id, subject := p.Parse() if id == -1 { return } @@ -103,7 +104,10 @@ func (a *App) EditTodoSubject(input string) { if todo == nil { return } + todo.Subject = subject + todo.Projects = p.Projects(subject) + todo.Contexts = p.Contexts(subject) a.Save() fmt.Println("Todo subject updated.") |
