Closed Bug 459483 Opened 16 years ago Closed 16 years ago

Growl alerts of New Mail are notifying for the first account which has new mail, not the account for which new mail has just been received.

Categories

(MailNews Core :: Backend, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: standard8, Assigned: humph)

References

Details

Attachments

(1 file)

From bug 308552 comment 99:

* We don't seem to be notifying for the account with new mail, but for the
first account which has new mail. I've got an IMAP account, and some POPs going
into Local Folders, so when I get new mail in the IMAP account, we notify on
it, and if I don't read it and later get new mail in Local Folders, we notify
about the IMAP account again instead of what's actually new.
Flags: wanted-thunderbird3+
Flags: blocking-thunderbird3?
Depends on: 308552
Whiteboard: dupeme
Probably bug 375717 which is probably 145982, but OSXIntegration bugs aren't sure duplicates of Win/UnixIntegration ones, at least until the Win/Unix bug fixes it for Mac too, because our ability to do multiple Growl messages at once (once we fix bug 459484) will let us do things they can't.
Hmm, except bug 375717 accuses us of (for my case from comment 0) alerting about new mail in Local Folders, and showing details of the first few things in the IMAP account - that would be fine for the Growl-without-details case, except it's not what we do.
Humph refers me here, the issue I faced was having a Growl notification that said "News & Blogs have 0 messages" when I actually had an update to a feed.
The issue here is that we were assuming that the mFoldersWithNewMail contained the folder with mail at the front of the list.  It will actually be at the end, or perhaps in the middle (i.e., if you have a lot of folders reporting mail, it will move into the middle).  So rather than getting the final element, I'm just passing in the reporting folder and using that.
Assignee: nobody → david.humphrey
Attachment #347791 - Flags: review?(bugzilla)
Is this the bug for the issue that you only get a growl notification for the first account if you receive new mails for two different accounts (at the same time)? Because I've tested this patch in my own build,  but I still get only a notification for the first account. Or is this issue another bug?
(In reply to comment #5)
> Is this the bug for the issue that you only get a growl notification for the
> first account if you receive new mails for two different accounts (at the same
> time)?

I'm not sure what you're seeing.  This patch fixes the issue that we queue up folders with new mail, and when you have multiple folders that have had new mail, we currently report the account name of the first vs. the one that just got mail.

It's possible that there is another (new) bug on simultaneous BiffState for multiple folders causing only one to get through.  Bug 459484 is partly about this.
(In reply to comment #6)

> I'm not sure what you're seeing.
Maybe this explanes better what I mean: https://bugzilla.mozilla.org/show_bug.cgi?id=308552#c106
David, does your patch work when new mail is filtered to a different imap or pop3 folder? I'm not sure which folder gets the notification in that case.
(In reply to comment #8)
> David, does your patch work when new mail is filtered to a different imap or
> pop3 folder?

I don't use filters, so I'm not sure.  I did a simple test to have mail containing "Filter Test" in the subject go to Trash, and it didn't cause a notification--the filter seemed to whisk it away before the folder could report it.  What is the expected behaviour?
Trash is a special folder, for filters, and we treat those messages as deleted. Can you try a non-special folder?
> Can you try a non-special folder?

Mail comes into Inbox, filter catches it, mail moves, Growl notification for root folder (note: the root folder reports regardless of whether I use a filter or not).
oh, so it's always a root folder - then the only issue might be when filters move mail across accounts, but that's not so common. I'll try out this patch on my mac...something similar might need to happen for windows as well, since the code is the same, and I can look into that as well.
I was thinking the same (about Windows) and was going to look at bug 375717 when I had a chance.  I think you could solve that with this too.

Question: is biff supposed to be for the root folder vs. the inbox?
biff is more or less per-account, and the root folder stands in for the account. Usually it's the inbox that receives new mail, but there are cases where it's not...
Comment on attachment 347791 [details] [diff] [review]
Use reporting folder vs. mFoldersWithNewMail[0]

David and David seem to be working on this at the moment and probably have a better idea. So switching reviewers for now, you can always come back to me for sr.
Attachment #347791 - Flags: review?(bugzilla) → review?(bienvenu)
Attachment #347791 - Flags: superreview?(bugzilla)
Attachment #347791 - Flags: review?(bienvenu)
Attachment #347791 - Flags: review+
Comment on attachment 347791 [details] [diff] [review]
Use reporting folder vs. mFoldersWithNewMail[0]

thx, humph, this looks good and seems to be working - over to Standard8 for sr
Attachment #347791 - Flags: superreview?(bugzilla) → superreview+
Comment on attachment 347791 [details] [diff] [review]
Use reporting folder vs. mFoldersWithNewMail[0]

Yep, let's see how this goes.
I've now pushed this: http://hg.mozilla.org/comm-central/rev/220d9462229c
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: blocking-thunderbird3?
Resolution: --- → FIXED
Whiteboard: dupeme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: