From 3d93d4ca4ff14bac3d4948995d33e11d83c33f80 Mon Sep 17 00:00:00 2001 From: Quey-Liang Kao Date: Fri, 7 Jul 2017 23:20:04 +0800 Subject: Fix #65, filtering out completed todos in agenda mode --- todolist/date_filter.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'todolist') 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) -- cgit v1.3