summaryrefslogtreecommitdiffstats
path: root/mailnews/base/src
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 22:59:41 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 22:59:41 -0500
commit2fa79c8372780e7c198c84b677b5290f5b120900 (patch)
tree5cb62dc66061dddeac45632f97012fcb0ed26cd0 /mailnews/base/src
parent6d5922ba891f5f0e37f6c70f16aae558f1a4063d (diff)
downloadUXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar
UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar.gz
UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar.lz
UXP-2fa79c8372780e7c198c84b677b5290f5b120900.tar.xz
UXP-2fa79c8372780e7c198c84b677b5290f5b120900.zip
Bug 809513 - Prevent unread Drafts from showing in new mail notification.
Change mainly affects Windows. However, Linux integration also changed so that it also allows new mail notification to occur for folder with SentMail flag. Tag #1273
Diffstat (limited to 'mailnews/base/src')
-rw-r--r--mailnews/base/src/nsMessengerUnixIntegration.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/mailnews/base/src/nsMessengerUnixIntegration.cpp b/mailnews/base/src/nsMessengerUnixIntegration.cpp
index 0e4dd1405..cb76a5fba 100644
--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp
@@ -609,10 +609,14 @@ nsresult nsMessengerUnixIntegration::GetFirstFolderWithNewMail(nsACString& aFold
if (NS_FAILED(rv))
continue;
- // Unless we're dealing with an Inbox, we don't care
- // about Drafts, Queue, SentMail, Template, or Junk folders
- if (!(flags & nsMsgFolderFlags::Inbox) &&
- (flags & (nsMsgFolderFlags::SpecialUse & ~nsMsgFolderFlags::Inbox)))
+ bool notify =
+ // Any folder which is an inbox or ...
+ flags & nsMsgFolderFlags::Inbox ||
+ // any non-special or non-virtual folder. In other words, we don't
+ // notify for Drafts|Trash|SentMail|Templates|Junk|Archive|Queue or virtual.
+ !(flags & (nsMsgFolderFlags::SpecialUse | nsMsgFolderFlags::Virtual));
+
+ if (!notify)
continue;
nsCString folderURI;