Skip to content

Commit

Permalink
Do not compute unseen messages counter for deleted folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioo committed Jul 28, 2017
1 parent 31f99ae commit 4a9d77f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modoboa_webmail/lib/imaputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,9 @@ def getmboxes(
continue
del mb["send_status"]
key = "path" if "path" in mb else "name"
if not mb.get("removed", False):
count = self.unseen_messages(mb[key])
if mb.get("removed", False):
continue
count = self.unseen_messages(mb[key])
if count == 0:
continue
mb["unseen"] = count
Expand Down

0 comments on commit 4a9d77f

Please sign in to comment.