Closed Bug 1832395 Opened 2 years ago Closed 2 years ago

"Tray icon always on" has stopped working

Categories

(Thunderbird :: OS Integration, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr102 unaffected, thunderbird114 wontfix, thunderbird115 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
thunderbird_esr102 --- unaffected
thunderbird114 --- wontfix
thunderbird115 --- fixed

People

(Reporter: betterbird.project, Assigned: leftmostcat)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [snnot3p])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1727874 +++

"Tray icon always on" has stopped working, in Daily it works sometimes, other times it doesn't. In slower debug builds, it mostly doesn't work.

We debugged it and it turns out that "profile-after-change" does not fire any more
https://searchfox.org/comm-central/search?q=profile-after-change&path=MailNotificationManager.jsm&case=false&regexp=false

Likely that MailNotificationManager is initialized later now after "profile-after-change" has already run. We recommend to run this._updateUnreadCount(); directly.

Keywords: regression
Version: Thunderbird 91 → Thunderbird 115
Regressed by: 1783770

I was the author of the "keep tray icon" change, however I'm out of my depth here with how the events firing sequence changed and may need some assistance on where from to call the init method now?

Just take the patch, attach it here and ask for review. Can you confirm that it doesn't work reliably in Daily or beta? For us it fails about every third time.

John, is this add-on territory? wrt "profile-after-change" does not fire any more.
Also: would you think that this is related to sn-3pane changes?

(In reply to BB from comment #0)

We debugged it and it turns out that "profile-after-change" does not fire any more
https://searchfox.org/comm-central/search?q=profile-after-change&path=MailNotificationManager.jsm&case=false&regexp=false

Likely that MailNotificationManager is initialized later now after "profile-after-change" has already run. We recommend to run this._updateUnreadCount(); directly.

^^ Geoff, fyi. Recommendation to "run this._updateUnreadCount(); directly" reminded me of bug 1833345. Otherwise, just ignore.

Flags: needinfo?(john)
Flags: needinfo?(geoff)

This is not code I am involved with or have deeper knowledge. I can confirm, that profile-after-change is not fired and this is never executed:
https://searchfox.org/comm-central/rev/1045fa69e30893e86041a615f0bdfd4bc78bfa21/mailnews/base/src/MailNotificationManager.jsm#120-123

I do not think this is add-on related, but this change in core stopped working.

Flags: needinfo?(john)
Assignee: nobody → leftmostcat
Status: UNCONFIRMED → NEW
Ever confirmed: true

This issue here appears to be in our expectations: we expect MailNotificationService to notify us of an update to the unread message count some time after we've registered a listener for it. However, it now sends out the notification on startup and we can only listen after it's started.

Flags: needinfo?(geoff)

Does the patch from comment #1 not work?

(In reply to Fred Vanderstein from comment #8)

Does the patch from comment #1 not work?

That patch will be the basis of the fix, but some additional work is needed around it before it can be merged.

Status: NEW → ASSIGNED
Target Milestone: --- → 116 Branch

Pushed by elizabeth@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/78947f14f83d
Ensure listeners have accurate new/unread mail count on startup. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9337930 [details]
Bug 1832395 - Ensure listeners have accurate new/unread mail count on startup. r=darktrojan

[Triage Comment]
Approved for beta

Attachment #9337930 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: