Commit 40c287f8 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Use the (new) TodoListBase.replace() method to sort the list.

parent 6838c011
......@@ -39,8 +39,7 @@ class SortCommand(Command):
sorter = Sorter(expression) # TODO: validate
sorted_todos = sorter.sort(self.todolist.todos())
self.todolist.erase()
self.todolist.add_todos(sorted_todos)
self.todolist.replace(sorted_todos)
def usage(self):
return """Synopsis: sort [expression]"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment