summaryrefslogtreecommitdiff
path: root/mail/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-06-09 11:32:41 -0400
committerKali Kaneko <kali@leap.se>2015-06-09 11:32:41 -0400
commit6f7a23aed1b813aef17504ae7f729453ac24b95e (patch)
tree3b6a0ea88ca6be8cfb56bc4107beb9b0d7d15ca4 /mail/src
parentfc0e04a5abe379a82ad54796d630e237b4800dbe (diff)
[bug] pass the doclist to the ui signal
before, we were taking the length of a string, signalling an incorrect number to the ui. currently this event is not being used, just only logged. in the future the ui could probably might want to make use of this info to keep record of a separate counter (how many mails received in the last sync).
Diffstat (limited to 'mail/src')
-rw-r--r--mail/src/leap/mail/incoming/service.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mail/src/leap/mail/incoming/service.py b/mail/src/leap/mail/incoming/service.py
index 4738dd4b..3daf86b2 100644
--- a/mail/src/leap/mail/incoming/service.py
+++ b/mail/src/leap/mail/incoming/service.py
@@ -239,8 +239,6 @@ class IncomingMail(Service):
:returns: doclist
:rtype: iterable
"""
- # FIXME WTF len(doclist) is 69?
- doclist = first(doclist) # gatherResults pass us a list
if doclist:
fetched_ts = time.mktime(time.gmtime())
num_mails = len(doclist) if doclist is not None else 0
@@ -299,7 +297,9 @@ class IncomingMail(Service):
d.addCallback(self._extract_keys)
d.addCallbacks(self._add_message_locally, self._errback)
deferreds.append(d)
- return defer.gatherResults(deferreds, consumeErrors=True)
+ d = defer.gatherResults(deferreds, consumeErrors=True)
+ d.addCallback(lambda _: doclist)
+ return d
#
# operations on individual messages