diff options
author | Kali Kaneko <kali@leap.se> | 2013-09-12 14:17:10 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-09-12 14:17:10 +0200 |
commit | ef62936f96cd1f84254af5a20b007b62bff6b8f7 (patch) | |
tree | ea4c01eec8ec75fc027cc8d4dbce0a2a1dd45557 /src/leap/mail/imap/fetch.py | |
parent | feee46c78f04af0dd75b877a507e4a617f29f9a9 (diff) | |
parent | 3c4613fa7faf053355ee9ed863ea8b4a30cb6b50 (diff) |
Merge tag '0.3.2' into debian-0.3.2
Tag leap.mail version 0.3.2
Diffstat (limited to 'src/leap/mail/imap/fetch.py')
-rw-r--r-- | src/leap/mail/imap/fetch.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py index 8b29c5e..e620a58 100644 --- a/src/leap/mail/imap/fetch.py +++ b/src/leap/mail/imap/fetch.py @@ -150,6 +150,13 @@ class LeapIncomingMail(object): doclist = self._soledad.get_from_index("just-mail", "*") return doclist + def _signal_unread_to_ui(self): + """ + Sends unread event to ui. + """ + leap_events.signal( + IMAP_UNREAD_MAIL, str(self._inbox.getUnseenCount())) + def _signal_fetch_to_ui(self, doclist): """ Sends leap events to ui. @@ -164,8 +171,7 @@ class LeapIncomingMail(object): log.msg("there are %s mails" % (num_mails,)) leap_events.signal( IMAP_FETCHED_INCOMING, str(num_mails), str(fetched_ts)) - leap_events.signal( - IMAP_UNREAD_MAIL, str(self._inbox.getUnseenCount())) + self._signal_unread_to_ui() return doclist def _sync_soledad_error(self, failure): @@ -318,3 +324,4 @@ class LeapIncomingMail(object): self._soledad.delete_doc(doc) log.msg("deleted doc %s from incoming" % doc_id) leap_events.signal(IMAP_MSG_DELETED_INCOMING) + self._signal_unread_to_ui() |