Commit 34a5d7a4 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Provide getter for the todos inside a view.

parent 92f078b7
......@@ -118,7 +118,7 @@ class EditCommand(MultiCommand, ExpressionCommand):
return call([editor, archive]) == 0
if self.is_expression:
self.todos = self._view()._viewdata
self.todos = self._view().todos()
else:
self.get_todos(self.args)
......
......@@ -73,5 +73,9 @@ class View(object):
return printer.print_list(self._viewdata)
def todos(self):
""" Returns a sorted and filtered list of todos in this view. """
return self._viewdata
def __str__(self):
return self._printer.print_list(self._viewdata)
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