Do not sort all todos when the items will be grouped
When grouping takes place, don't sort the full list of todo items first and then group. Because the todos in the group won't necessarily match the given sort expression, for those items which match multiple groups. These are the steps instead: 1. Get all todo items 2. Filter them 3. Pre-order them according to the group expression 4. Split in groups using groupby() 5. Then sort the individual groups according to the sort expression
Showing
Please register or sign in to comment