diff options
author | rafael lisboa <rafaelzlisboa@gmail.com> | 2015-05-19 17:04:49 -0300 |
---|---|---|
committer | rafael lisboa <rafaelzlisboa@gmail.com> | 2015-05-19 17:04:49 -0300 |
commit | fcde31733d32021b604a39574cbe47dd7d7f1a0f (patch) | |
tree | bb156ee26b29ea29f77e8b3659d91c3687dd13f7 /service/pixelated/adapter/soledad | |
parent | 6f2481f187ff99a2fe27844c0bc42682da98f2de (diff) |
stop unneeded index rebuild and endless marking of recent docs
(paired with @shyba)
this should stop soledad sync from running repeatedly
- removes all callbacks to the SOLEDAD_DONE_DATA_SYNC event after
they’re called
- avoid re-marking a document as recent if it was already marked
Diffstat (limited to 'service/pixelated/adapter/soledad')
-rw-r--r-- | service/pixelated/adapter/soledad/soledad_writer_mixin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/adapter/soledad/soledad_writer_mixin.py b/service/pixelated/adapter/soledad/soledad_writer_mixin.py index 9c5eb47a..8e7a46f2 100644 --- a/service/pixelated/adapter/soledad/soledad_writer_mixin.py +++ b/service/pixelated/adapter/soledad/soledad_writer_mixin.py @@ -21,7 +21,7 @@ class SoledadWriterMixin(SoledadDbFacadeMixin, object): def mark_all_as_not_recent(self): for mailbox in ['INBOX', 'DRAFTS', 'SENT', 'TRASH']: rct = self.get_recent_by_mbox(mailbox) - if len(rct) == 0: + if not rct or not rct[0].content['rct']: return rct = rct[0] rct.content['rct'] = [] |