diff --git a/dist/plan b/dist/plan index 30ea2c6..84756b0 100755 Binary files a/dist/plan and b/dist/plan differ diff --git a/plan/command/list.go b/plan/command/list.go index 7e3f910..4095ccf 100644 --- a/plan/command/list.go +++ b/plan/command/list.go @@ -138,6 +138,12 @@ type ListResult struct { func (lr ListResult) Render() string { sort.Slice(lr.Tasks, func(i, j int) bool { + if lr.Tasks[i].Task.Date.After(lr.Tasks[j].Task.Date) { + return false + } + if lr.Tasks[j].Task.Date.After(lr.Tasks[i].Task.Date) { + return true + } if lr.Tasks[i].Task.Project < lr.Tasks[j].Task.Project { return true } @@ -150,9 +156,6 @@ func (lr ListResult) Render() string { if lr.Tasks[i].Task.Recurrer != nil && lr.Tasks[j].Task.Recurrer == nil { return false } - if lr.Tasks[i].Task.Date.After(lr.Tasks[j].Task.Date) { - return false - } return lr.Tasks[i].LocalID < lr.Tasks[j].LocalID })