summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-03-15 00:21:25 +0100
committerRuben Pollan <meskio@sindominio.net>2017-03-15 00:21:25 +0100
commita3a2ede2142534c8d6abec2614f4c86b70f9bfe3 (patch)
treef0bb5b84180877a33a6402e2d91d1755d36910ef
parenta6b83223ee5437936dc0389a92bde68bd93d477c (diff)
[bug] don't check the number of unread mails if incoming service hasn't started
-rw-r--r--src/leap/bitmask/core/mail_services.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index 67dd9cdc..019a1048 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -779,7 +779,8 @@ class IncomingMailService(service.MultiService):
status = self._status[userid]
incoming = self.getServiceNamed(userid)
- status['unread'] = yield incoming.unread()
+ if ['status'] == 'on':
+ status['unread'] = yield incoming.unread()
defer.returnValue(status)
def _set_status(self, address, status, error=None, unread=None):