diff options
author | Bruno Wagner Goncalves <bwagner@thoughtworks.com> | 2014-08-21 18:39:27 -0300 |
---|---|---|
committer | Bruno Wagner Goncalves <bwagner@thoughtworks.com> | 2014-08-21 18:39:27 -0300 |
commit | 24daa2bf8929e799890297fe30abbfd8a46016f9 (patch) | |
tree | da0d57efd6a75919c529ca2b51e08bdc2b53ffc8 | |
parent | f95c3ea07d9353771eb45c06e1dd14a50d3528a7 (diff) |
MessageCollection iterators must instantiate LeapMessage with the collection
-rw-r--r-- | mail/src/leap/mail/imap/messages.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mail/src/leap/mail/imap/messages.py b/mail/src/leap/mail/imap/messages.py index b0b2f953..11dcd8f9 100644 --- a/mail/src/leap/mail/imap/messages.py +++ b/mail/src/leap/mail/imap/messages.py @@ -1337,7 +1337,7 @@ class MessageCollection(WithMsgFields, IndexedDB, MBoxParser): :returns: a list of LeapMessages :rtype: list """ - return [LeapMessage(self._soledad, docid, self.mbox) + return [LeapMessage(self._soledad, docid, self.mbox, collection=self) for docid in self.unseen_iter()] # recent messages @@ -1370,7 +1370,7 @@ class MessageCollection(WithMsgFields, IndexedDB, MBoxParser): :returns: iterator of dicts with content for all messages. :rtype: iterable """ - return (LeapMessage(self._soledad, docuid, self.mbox) + return (LeapMessage(self._soledad, docuid, self.mbox, collection=self) for docuid in self.all_uid_iter()) def __repr__(self): |