diff options
author | Kali Kaneko <kali@leap.se> | 2015-06-09 11:32:41 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-06-09 11:32:41 -0400 |
commit | 03cc09d35c880a5805ac9bdbad4a8b6ebe8e717f (patch) | |
tree | 2dce423c78173a21b0bda2c5209f77c2d4b40c89 /src/leap/mail/incoming | |
parent | a94677b94326ffa2900141092c70d9559e01853a (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 'src/leap/mail/incoming')
-rw-r--r-- | src/leap/mail/incoming/service.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/mail/incoming/service.py b/src/leap/mail/incoming/service.py index 4738dd4..3daf86b 100644 --- a/src/leap/mail/incoming/service.py +++ b/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 |