Add order to tasks and lists
This commit is contained in:
@@ -77,7 +77,10 @@ func (a *Ajax) storageListTasks(listID string, filters ...func(t *task.Task) boo
|
||||
}
|
||||
}
|
||||
sort.SliceStable(tasks, func(i, j int) bool {
|
||||
return tasks[i].Created.Before(tasks[j].Created)
|
||||
if tasks[i].Index == tasks[j].Index {
|
||||
return tasks[i].Created.Before(tasks[j].Created)
|
||||
}
|
||||
return tasks[i].Index < tasks[j].Index
|
||||
})
|
||||
return tasks, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user