If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

the message count wrong on virtual folders when opening virtual folder in a new window

RESOLVED FIXED in Thunderbird 3.0b3

Status

Thunderbird
Mail Window Front End
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Boying Lu, Assigned: Boying Lu)

Tracking

Trunk
Thunderbird 3.0b3

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 4 obsolete attachments)

(Assignee)

Description

9 years ago
Steps to re-produce:
1. Start TB
2. Create a virtual folder defined as "To or CC" to my e-mail address
3. Select the virtual folder
4. Right click on the folder and select "Open" in the popup menu
5. Send to an e-mail to your e-mail address from another machine or through 
   a web
6. Click "Get Mail" button to get new mails.

Expected result:
The Unread Message count should be increased by one

Actual result:
The count is increased by two.
(Assignee)

Comment 1

9 years ago
Created attachment 369640 [details] [diff] [review]
Update the unread count only when the new message isn't in the cache
Assignee: nobody → brian.lu
Attachment #369640 - Flags: review?(bugzilla)

Comment 2

9 years ago
what if I mark an existing message read/unread from an other window? Shouldn't that adjust the read count?
Comment on attachment 369640 [details] [diff] [review]
Update the unread count only when the new message isn't in the cache

Passing to David - he knows this code better than I do.
Attachment #369640 - Flags: review?(bugzilla) → review?(bienvenu)
(Assignee)

Updated

9 years ago
Attachment #369640 - Flags: review?(bienvenu) → review-
(Assignee)

Comment 4

9 years ago
I'm making a new patch and will post it here when it's ready
(Assignee)

Comment 5

9 years ago
Created attachment 370581 [details] [diff] [review]
the new patch also fixes the case when mark a message as "Read"/"Unread"
Attachment #369640 - Attachment is obsolete: true
Attachment #370581 - Flags: review?(bienvenu)

Comment 6

9 years ago
this patch seems to handle getting two notifications for the same change by remembering the previous notification and ignoring it. Why are we getting two notifications? Are we registering twice? Seems like it would be better to fix the root cause.
(Assignee)

Comment 7

9 years ago
Created attachment 373288 [details] [diff] [review]
Register the listener only once
Attachment #370581 - Attachment is obsolete: true
Attachment #373288 - Flags: review?(bienvenu)
Attachment #370581 - Flags: review?(bienvenu)

Comment 8

9 years ago
Comment on attachment 373288 [details] [diff] [review]
Register the listener only once

cool thx, that's much nicer. So the issue is that we're loading virtualFolders.dat twice, and adding multiple listeners. I'm wondering if we should just protect against this at the start of this function, and return early.

Comment 9

9 years ago
Comment on attachment 373288 [details] [diff] [review]
Register the listener only once

thinking about it a bit more, that's what I'd like - a check for m_virtualFoldersLoaded at the start of this method. Thx for working on this!
Attachment #373288 - Flags: review?(bienvenu) → review-
(Assignee)

Comment 10

9 years ago
Created attachment 373609 [details] [diff] [review]
check m_virtualFoldersLoaded at the start
Attachment #373288 - Attachment is obsolete: true
Attachment #373609 - Flags: review?(bienvenu)

Comment 11

9 years ago
FWIW: There is an extra space between return and NS_OK.
(Assignee)

Comment 12

9 years ago
Created attachment 373612 [details] [diff] [review]
remove extra space
Attachment #373609 - Attachment is obsolete: true
Attachment #373612 - Flags: review?(bienvenu)
Attachment #373609 - Flags: review?(bienvenu)

Comment 13

9 years ago
Comment on attachment 373612 [details] [diff] [review]
remove extra space

looks good, thx for fixing this.
Attachment #373612 - Flags: superreview+
Attachment #373612 - Flags: review?(bienvenu)
Attachment #373612 - Flags: review+
(Assignee)

Updated

9 years ago
Keywords: checkin-needed

Comment 14

9 years ago
Pushed:
http://hg.mozilla.org/comm-central/rev/2fa9b1dc9030
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
(In reply to comment #14)
> Pushed:
> http://hg.mozilla.org/comm-central/rev/2fa9b1dc9030

Please set the target milestone when marking fixed, it helps with tracking later on.
OS: Solaris → All
Hardware: x86 → All
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.