diff options
-rw-r--r-- | changes/bug_display_new_mail_only | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mail_status.py | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/changes/bug_display_new_mail_only b/changes/bug_display_new_mail_only new file mode 100644 index 00000000..218cd16e --- /dev/null +++ b/changes/bug_display_new_mail_only @@ -0,0 +1 @@ + o Only show N unread Emails when N > 0. Fixes #4098.
\ No newline at end of file diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py index 2ac9a332..83533666 100644 --- a/src/leap/bitmask/gui/mail_status.py +++ b/src/leap/bitmask/gui/mail_status.py @@ -387,8 +387,11 @@ class MailStatusWidget(QtGui.QWidget): self._set_mail_status(self.tr("Failed")) elif req.event == proto.IMAP_UNREAD_MAIL: if self._smtp_started and self._imap_started: - self._set_mail_status(self.tr("%s Unread Emails") % - (req.content), ready=2) + if req.content != "0": + self._set_mail_status(self.tr("%s Unread Emails") % + (req.content,), ready=2) + else: + self._set_mail_status("", ready=2) else: leap_assert(False, # XXX ??? "Don't know how to handle this state: %s" |