Don't get articles if already seen.
This commit is contained in:
parent
a81281e79e
commit
b30b6398fa
1 changed files with 3 additions and 2 deletions
|
|
@ -85,9 +85,10 @@ class GenericNewspaperBackend(BaseBackend, ICapMessages):
|
||||||
|
|
||||||
def iter_unread_messages(self, thread=None):
|
def iter_unread_messages(self, thread=None):
|
||||||
for thread in self.iter_threads():
|
for thread in self.iter_threads():
|
||||||
|
if thread.id in self.storage.get('seen', default={}):
|
||||||
|
continue
|
||||||
self.fill_thread(thread, 'root')
|
self.fill_thread(thread, 'root')
|
||||||
for msg in thread.iter_all_messages():
|
for msg in thread.iter_all_messages():
|
||||||
if msg.flags & msg.IS_UNREAD:
|
|
||||||
yield msg
|
yield msg
|
||||||
|
|
||||||
def set_message_read(self, message):
|
def set_message_read(self, message):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue