cbrooker / MMM-Todoist

This is an extension for the MagicMirror2 platform. It will display your Todoist todos on your MagicMirror.
MIT License
151 stars 58 forks source link

Fix sortbytodoist and add subtask indenting #115

Closed matt-thurling closed 1 year ago

matt-thurling commented 1 year ago

I found that when you display a project that has parent tasks with subtasks, the sort order appeared to be very random. When I looked into the code I realised that's because it was sorting based on the 'child-order' field only which made no sense i.e. the first child of every task was sorted together, followed by the second child of every task etc. I've fixed it up so that now it will sort parent tasks based on their id, and child tasks based on their parents id and their child_order i.e. subtasks will now be sorted under their parents as you would expect. I also added an indent for the child tasks when sorting this way so it was clearer that they were children of their parent task above. See the screenshot below for how this looks when you import Todoists's wedding planner template.

Screen Shot 2023-03-05 at 9 14 43 am
matt-thurling commented 1 year ago

I think this would fix the issues raised as #94 and #100