Closed Bug 466241 Opened 16 years ago Closed 16 years ago

cross-folder view thread counts not updated

Categories

(MailNews Core :: Backend, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Details

Attachments

(1 file, 1 obsolete file)

If I read a message in a cross-folder view in threaded mode, it doesn't update the unread column. Since I don't use those columns, I hadn't noticed this. Fix upcoming.

This also causes an issue if you read a message in a saved search before its finished doing the search, since we count on those thread counts to figure out how many unread and total messages there are in the view.
Flags: blocking-thunderbird3+
Attached patch proposed fix (obsolete) — Splinter Review
it's really the second issue I mentioned that makes this important for users on slower machines who can read messages in saved searches before the search finishes.
Attachment #349584 - Flags: superreview?(bugzilla)
Attachment #349584 - Flags: review?(bugzilla)
Whiteboard: [has patch, needs review Standard8]
Comment on attachment 349584 [details] [diff] [review]
proposed fix

>+  // defer to base class if we're grouped or not threaded at all
>+  if (m_viewFlags & nsMsgViewFlagsType::kGroupBySort ||
>+      !(m_viewFlags && nsMsgViewFlagsType::kThreadedDisplay))
>+    return nsMsgGroupView::OnHdrFlagsChanged(aHdrChanged, aOldFlags, 
>+                                             aNewFlags, aInstigator);
>+  if (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)

I've found it a bit hard consistently reproducing this, but it does look like an improvement. I'm not quite sure why you need the second if. I'd also like a blank line after the return statement.
you're right; we don't need to check that flag again. I had rearranged the code to make it simpler, but hadn't removed the second check...
Attachment #349584 - Attachment is obsolete: true
Attachment #349770 - Flags: superreview?(bugzilla)
Attachment #349770 - Flags: review?(bugzilla)
Attachment #349584 - Flags: superreview?(bugzilla)
Attachment #349584 - Flags: review?(bugzilla)
Whiteboard: [has patch, needs review Standard8] → [has new patch, needs review Standard8]
This seems to be the right thing to do, though I think I have a reproducible case where it doesn't work:

1) As an IMAP subfolder set up a cross-folder view, threaded. Also have some newsgroups available with unread messages (but don't add them yet).
2) Restart TB
3) Select the saved search (I found it easier to sort by unread/read).
4) Select Properties, add some newsgroups to the list of folders
5) Select OK, view is regenerated.

Now notice that click on some of the newsgroup messages the unread count doesn't get updated.

It works fine if I restart TB then click the search.

So this is a bit strange. It looks like we're not adding some notification hooks somewhere (possibly related to bug 466299).

I did debug the code, and we go through your new function, and adjust counts, but it doesn't seem to get onto the UI, and I can't see where that should happen in that part of the update code.
thx for looking into this.

Saved searches have always had problems with newsgroups - I can look into it, but I wouldn't hold this patch for that...
this actually worked for me
Attachment #349770 - Flags: superreview?(bugzilla)
Attachment #349770 - Flags: superreview+
Attachment #349770 - Flags: review?(bugzilla)
Attachment #349770 - Flags: review+
Comment on attachment 349770 [details] [diff] [review]
fix addressing comments

I've seen this working and we'll look at the newsgroups issues at a later date.
fix checked in.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has new patch, needs review Standard8]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: