implement iter_unread_messages()
This commit is contained in:
parent
9ffe369600
commit
fc71859106
1 changed files with 7 additions and 0 deletions
|
|
@ -71,3 +71,10 @@ class Newspaper20minutesBackend(BaseBackend, ICapMessages):
|
|||
thread.title = article.title
|
||||
thread.date = article.datetime
|
||||
yield(thread)
|
||||
|
||||
def iter_unread_messages(self, thread=None):
|
||||
for thread in self.iter_threads():
|
||||
self.fill_thread(thread, 'root')
|
||||
for m in thread.iter_all_messages():
|
||||
if m.flags & m.IS_UNREAD:
|
||||
yield m
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue