- seen_todos: set[int] = set()
- seen_conditions: set[int] = set()
- todo_trees = [t.get_step_tree(seen_todos, seen_conditions)
- for t in top_todos]
- for condition in Condition.all(self.conn):
- enablers = Todo.enablers_for_at(self.conn, condition, date)
- disablers = Todo.disablers_for_at(self.conn, condition, date)
- conditions_listing += [{
- 'condition': condition,
- 'enablers': enablers,
- 'disablers': disablers}]
+ todo_trees = [t.get_undone_steps_tree() for t in top_todos]
+ done_trees = []
+ for t in top_todos:
+ done_trees += t.get_done_steps_tree()
+ condition_listings: list[ConditionListing] = []
+ for cond in Condition.all(self.conn):
+ enablers = Todo.enablers_for_at(self.conn, cond, date)
+ disablers = Todo.disablers_for_at(self.conn, cond, date)
+ condition_listings += [ConditionListing(cond, enablers, disablers)]