summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/mail
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/mail')
-rw-r--r--src/leap/bitmask/mail/incoming/service.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/bitmask/mail/incoming/service.py b/src/leap/bitmask/mail/incoming/service.py
index 4807c8f7..ac7a5d18 100644
--- a/src/leap/bitmask/mail/incoming/service.py
+++ b/src/leap/bitmask/mail/incoming/service.py
@@ -205,6 +205,13 @@ class IncomingMail(Service):
self._loop = None
Service.stopService(self)
+ def unread(self):
+ """
+ :returns: a deferred that will be fired with the number of unread
+ messages
+ """
+ return self._inbox_collection.count_unseen()
+
#
# Private methods.
#