Closed Bug 126626 Opened 23 years ago Closed 21 years ago

getNumUnread(true) and getTotalMessages(true) return incorrect values for servers

Categories

(MailNews Core :: Backend, defect)

x86
Windows 95
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: mscott)

References

()

Details

Attachments

(1 file, 1 obsolete file)

There's a later comment // it's legal for counts to be negative if we don't know
which stops subfolder negative counts from being considered. However the folder
itself might have a negative count. In this case getNumUnread could return 0
when a subfolder has a positive count. This stops next message navigation from
working. The fix is to ensure that the initial count is at least zero, this then
avoids the need for a test of the return from the deep search.
Attached patch Proposed patch (obsolete) — Splinter Review
Fix problem by moving negative test
*random acts of poking* ;)
Blocks: 201392
Attachment #70498 - Flags: superreview?(bienvenu)
Attachment #70498 - Flags: review?(scott)
Comment on attachment 70498 [details] [diff] [review]
Proposed patch

sr=bienvenu
Attachment #70498 - Flags: superreview?(bienvenu) → superreview+
Fix updated for bitrot and checked in.
Also applied to the total count, for consistency.
Summary: getNumUnread doesn't work properly if the count on the folder is unknown → getNumUnread(true) and getTotalMessages(true) return incorrect values for servers
Attachment #70498 - Attachment is obsolete: true
So I should actually close it as such :-)
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #70498 - Flags: review?(mscott)
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: