Closed
Bug 471772
Opened 16 years ago
Closed 3 years ago
new mail alert still broken (since RerootFolder() sets "NoMail", but new mail notification window hasn't popped up yet?)
Categories
(Thunderbird :: Mail Window Front End, defect)
Thunderbird
Mail Window Front End
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mkmelin, Unassigned)
References
Details
+++ This bug was initially created as a clone of Bug #466784 / bug 462762 +++
re-produce steps
1. open a terminal
2. thunderbird -P
create a new profile
3. setup a Gmail IMAP account
4. login
expected result:
new mail alert window will popup and new mail info is shown in that window.
actual result
screenshot: https://bugzilla.mozilla.org/attachment.cgi?id=350133
---
Bug 462762 comment 6:
I did some investigation on this issue. I think the root cause is in following
snippet in RerootFolder() (mail/base/content/commandglue.js)
//the new folder being selected should have its biff state get cleared.
if(newFolder)
{
newFolder.biffState =
Components.interfaces.nsIMsgFolder.nsMsgBiffState_NoMail;
}
Setting biffState to "NoMail" triggers
nsMessengerWinIntegration::OnItemIntPropertyChanged() to be called with
aNewValue = nsIMsgFolder::nsMsgBiffState_NoMail. So
mFolderWithNewMail->Clear() get called and mFolderWithNewMail gets cleared.
But new mail notification window hasn't poped up yet.
When setting up Gmail IMAP account for the fist time, following codes are
executed:
if (viewType != nsMsgViewType.eShowVirtualFolderResults &&
(folder.manyHeadersToDownload || showMessagesAfterLoading))
{
gRerootOnFolderLoad = true;
try
{
ClearThreadPane();
SetBusyCursor(window, true);
folder.startFolderLoading();
folder.updateFolder(msgWindow);
}
...
}
(in ChangeFolder() mail/base/content/commandglue.js).
Because msg db hasn't been created yet, fold.manyHeadersToDownload is "true",
so the "if" condition holds and gRerootOnFolderLoad is set to "true"
Later, in folderListener::OnItemEvent() is triggered with "FolderLoaded" event,
and following snippet is executed:
if (gRerootOnFolderLoad)
{
RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType,
gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType,
gCurrentLoadingFolderSortOrder);
}
(in mail/base/content/msgMail3PaneWindow.js:210)
RerootFolder() sets "NoMail", but new mail notification window hasn't popped up
yet. So the race condition occurs.
---
| Reporter | ||
Updated•16 years ago
|
Summary: Port bug 462762 windows changes to the unix integration for new mail alerts. → new mail alert still broken (since RerootFolder() sets "NoMail", but new mail notification window hasn't popped up yet?)
Comment 4•3 years ago
|
||
Flags: needinfo?(mkmelin+mozilla)
| Reporter | ||
Comment 5•3 years ago
|
||
Not that I recall.
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(mkmelin+mozilla)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•