summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/fetch.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-19 15:42:29 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-19 15:42:29 -0300
commitbbab478d267a412f300430e2cd70f31df27b8d18 (patch)
treeeda33a5d9ea9f4a419a2c0c6d54736f5509447b6 /src/leap/mail/imap/fetch.py
parent5db4bbed6eb1cfe707dfb8cb92a978e4313607d0 (diff)
Signal unread email
Diffstat (limited to 'src/leap/mail/imap/fetch.py')
-rw-r--r--src/leap/mail/imap/fetch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py
index 267af38..12534b3 100644
--- a/src/leap/mail/imap/fetch.py
+++ b/src/leap/mail/imap/fetch.py
@@ -36,6 +36,7 @@ from leap.common.events.events_pb2 import IMAP_MSG_PROCESSING
from leap.common.events.events_pb2 import IMAP_MSG_DECRYPTED
from leap.common.events.events_pb2 import IMAP_MSG_SAVED_LOCALLY
from leap.common.events.events_pb2 import IMAP_MSG_DELETED_INCOMING
+from leap.common.events.events_pb2 import IMAP_UNREAD_MAIL
logger = logging.getLogger(__name__)
@@ -134,6 +135,8 @@ 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()))
return doclist
except ssl.SSLError as exc:
logger.warning('SSL Error while syncing soledad: %r' % (exc,))