diff options
| author | Quey-Liang Kao <nonerkao@gmail.com> | 2017-07-07 23:20:04 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <nonerkao@gmail.com> | 2017-07-07 23:20:04 +0800 |
| commit | 3d93d4ca4ff14bac3d4948995d33e11d83c33f80 (patch) | |
| tree | 97be3c67de85ea00541f9e8c38af1c00f5e44f39 | |
| parent | dafb74428d8a16b28533aa25f83f25ea255c18a3 (diff) | |
Fix #65, filtering out completed todos in agenda mode
| -rw-r--r-- | todolist/date_filter.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/todolist/date_filter.go b/todolist/date_filter.go index fb06682..e876ba1 100644 --- a/todolist/date_filter.go +++ b/todolist/date_filter.go @@ -60,6 +60,9 @@ func (f *DateFilter) filterAgenda(pivot time.Time) []*Todo { if todo.Due == "" { continue } + if todo.Completed { + continue + } dueTime, _ := time.ParseInLocation("2006-01-02", todo.Due, f.Location) if dueTime.Before(pivot) || todo.Due == pivot.Format("2006-01-02") { ret = append(ret, todo) |
