Closed Bug 1824889 Opened 2 years ago Closed 1 year ago

Unread message badge on taskbar icon does not go away when message has been read

Categories

(Thunderbird :: Mail Window Front End, defect, P3)

Thunderbird 102

Tracking

(thunderbird_esr115 fixed, thunderbird118 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
thunderbird_esr115 --- fixed
thunderbird118 --- fixed

People

(Reporter: todor, Assigned: mkmelin)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Steps to reproduce:

  1. Add same IMAP account to Thunderbird (on windows) and to smartphone (android in my case).
  2. Receive email on that account. Wait for notification on both Thunderbird and smartphone.
  3. Read or delete the email on the smart phone. Wait some time to sync the changes.

Actual results:

  1. Notification dot on Thunderbirds icon in tray bar is still there and will not disappear until I open Thunderbird and go over the email address (which appears as bold). Then the notification disappears and the mailbox is not bold any more.

Expected results:

Notification for new email on Thunderbird should disappear once it sync the mailbox content without needing me to open it and click over the mailbox.

Summary: Notification dot not dissappear → Notification dot not disappear
Duplicate of this bug: 1824729
Summary: Notification dot not disappear → new mail notification do not disappear after reading the mail
Summary: new mail notification do not disappear after reading the mail → Unread message badge on taskbar icon does not go away when message has been read
See Also: → 1791160
Duplicate of this bug: 1836605
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → leftmostcat
Blocks: 1791160
Duplicate of this bug: 1791160
Blocks: 1826773
Duplicate of this bug: 1826773
Blocks: 1742374
Blocks: 1750324

Is bug 1801078 a duplicate?

Other bug reports https://mzl.la/3X2zEPS

Better query https://mzl.la/3J7g5As - but these are not all about the dot.

Severity: -- → S4
Priority: -- → P3
Duplicate of this bug: 1843892

I have the same problem on 115.0, even if I read the message on TB, but the icon stays as if the new message is not read.
When selecting the same or another folder, the icon goes back to normal.

More duplicates: Bug 1843837, bug 1843766 and bug 1843734. There's a suggestion in bug 1843734 comment #3.

(In reply to Celso from comment #9)

I have the same problem on 115.0, even if I read the message on TB, but the icon stays as if the new message is not read.
When selecting the same or another folder, the icon goes back to normal.

I had this before and still have it after upgrading to 115. Also, requires changing folder to clear the badge count.

Duplicate of this bug: 1844649
Duplicate of this bug: 1843837
Duplicate of this bug: 1843734
Duplicate of this bug: 1843766
Duplicate of this bug: 1813328
Duplicate of this bug: 1748612
Duplicate of this bug: 1848591
Duplicate of this bug: 1849620

For me, this used to work on 102 (Win10) but started to behave as described here after the update to 115.

This bug is different to the one I submitted a couple of years ago. (With which it has been merged.)

The steps required to reproduce are quite different.

My report was about folders within a single account not being handled correctly (as, it appears, were several others that have been incorrectly merged with this). It has also existed for many years and has nothing to do with W10/W11.

It seems that bugs are being merged without the person merging properly understanding their nature.

Oh, you're actually right. I went here from https://bugzilla.mozilla.org/show_bug.cgi?id=1849620 with the idea of not commenting on a dupe, but reading your STR once more carefully, I agree those two are actually different bugs (with similar manifestation).

@john.guitarman could you please remove the dupe status of https://bugzilla.mozilla.org/show_bug.cgi?id=1849620 ?

No longer duplicate of this bug: 1849620

No silver bullet, but I think time of initialization may be somewhat incorrect so the code gets confused.
Modernize NewMailNotificationService.
Some changes insipired by https://github.com/Betterbird/thunderbird-patches/blob/main/115/features/02b-feature-Windows-systray-tooltip.patch

Please correct this hunk:

    if (this.countNew) {
      this.initUnreadCount();
    }

It needs to be if (!this.countNew) {, see
https://github.com/Betterbird/thunderbird-patches/blob/8b2cf4bc70910088a8dac6d9c3a8377b59ed9f5a/115/features/02b-feature-Windows-systray-tooltip.patch#L117

The logic is: If we're counting new messages, we don't need to traverse all folders and count unread messages. Since counting new message is the default on Windows and Linux, that's a definite startup performance improvement.

Equally, this hunk needs fixing: if (subject == "profile-before-change") { - it should be topic like it was before.

See Also: → 1850289
See Also: → 1852221

So this patch will probably fix some cases but unclear if all.
Maybe easiest still to close this bug now and continue in one of the other see also bugs if needed,

Assignee: leftmostcat → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 119 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/28a5389aa264
Initialize MailNotificationManager before getting mail. r=leftmostcat

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/c21caa5b4d1c follow-up, make unread setter available for tests. r=babolivier

Ready for beta?

Flags: needinfo?(mkmelin+mozilla)

Comment on attachment 9350798 [details]
Bug 1824889 - Initialize MailNotificationManager before getting mail. r=leftmostcat

[Approval Request Comment]
Regression caused by (bug #): unknown
User impact if declined: could help with buggy mail notification behavior
Testing completed (on c-c, etc.): daily
Risk to taking this patch (and alternatives if risky): fairly safe, but should get some baking

Flags: needinfo?(mkmelin+mozilla)
Attachment #9350798 - Flags: approval-comm-esr115?
Attachment #9350798 - Flags: approval-comm-beta?

Comment on attachment 9350798 [details]
Bug 1824889 - Initialize MailNotificationManager before getting mail. r=leftmostcat

[Triage Comment]
Approved for beta

Attachment #9350798 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9352397 [details]
Bug 1824889 - follow-up, make unread setter available for tests. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9352397 - Flags: approval-comm-beta+
Attachment #9352397 - Flags: approval-comm-esr115?

Comment on attachment 9350798 [details]
Bug 1824889 - Initialize MailNotificationManager before getting mail. r=leftmostcat

[Triage Comment]
Approved for esr115

Attachment #9350798 - Flags: approval-comm-esr115? → approval-comm-esr115+

Comment on attachment 9352397 [details]
Bug 1824889 - follow-up, make unread setter available for tests. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr115

Attachment #9352397 - Flags: approval-comm-esr115? → approval-comm-esr115+
See Also: → 1855245
Duplicate of this bug: 1844727
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: