mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-25 08:37:30 +09:00
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
This commit is contained in:
parent
832d721135
commit
a3ac164730
2 changed files with 22 additions and 10 deletions
|
|
@ -57,14 +57,22 @@ function prefillAlertInfo()
|
||||||
folderSummaryInfoEl.mMaxMsgHdrsInPopup = gNumNewMsgsToShowInAlert;
|
folderSummaryInfoEl.mMaxMsgHdrsInPopup = gNumNewMsgsToShowInAlert;
|
||||||
for (let folder in fixIterator(allFolders, Components.interfaces.nsIMsgFolder))
|
for (let folder in fixIterator(allFolders, Components.interfaces.nsIMsgFolder))
|
||||||
{
|
{
|
||||||
if (folder.hasNewMessages && !folder.getFlag(Ci.nsMsgFolderFlags.Virtual))
|
if (folder.hasNewMessages) {
|
||||||
{
|
let notify =
|
||||||
|
// Any folder which is an inbox or ...
|
||||||
|
folder.getFlag(Ci.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.
|
||||||
|
!(folder.flags & (Ci.nsMsgFolderFlags.SpecialUse | Ci.nsMsgFolderFlags.Virtual));
|
||||||
|
|
||||||
|
if (notify) {
|
||||||
var asyncFetch = {};
|
var asyncFetch = {};
|
||||||
folderSummaryInfoEl.parseFolder(folder, new urlListener(folder), asyncFetch);
|
folderSummaryInfoEl.parseFolder(folder, new urlListener(folder), asyncFetch);
|
||||||
if (asyncFetch.value)
|
if (asyncFetch.value)
|
||||||
gPendingPreviewFetchRequests++;
|
gPendingPreviewFetchRequests++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function urlListener(aFolder)
|
function urlListener(aFolder)
|
||||||
|
|
|
||||||
|
|
@ -609,10 +609,14 @@ nsresult nsMessengerUnixIntegration::GetFirstFolderWithNewMail(nsACString& aFold
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Unless we're dealing with an Inbox, we don't care
|
bool notify =
|
||||||
// about Drafts, Queue, SentMail, Template, or Junk folders
|
// Any folder which is an inbox or ...
|
||||||
if (!(flags & nsMsgFolderFlags::Inbox) &&
|
flags & nsMsgFolderFlags::Inbox ||
|
||||||
(flags & (nsMsgFolderFlags::SpecialUse & ~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;
|
continue;
|
||||||
|
|
||||||
nsCString folderURI;
|
nsCString folderURI;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue