Change task naming for faster listing in future

This commit is contained in:
bel
2019-12-07 12:19:04 -07:00
parent 9752acbd76
commit e119d1d867
4 changed files with 78 additions and 10 deletions

View File

@@ -119,14 +119,16 @@ func (t *Task) AppendTags(tags []string) {
t.Tags = append(t.Tags, tags...)
}
func (t *Task) SetComplete(state bool) {
func (t *Task) SetComplete(state bool) bool {
t.touch()
changed := t.Complete != state
t.Complete = state
if t.Complete {
t.Completed = time.Now()
} else {
t.Completed = time.Time{}
}
return changed
}
func (t *Task) SetPrio(prio int) {