cross-folder view thread counts not updated

RESOLVED FIXED in Thunderbird 3.0b1

Status

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Tracking

Trunk
Thunderbird 3.0b1
x86
Windows XP
Bug Flags:
blocking-thunderbird3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
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+
(Assignee)

Comment 1

10 years ago
Created attachment 349584 [details] [diff] [review]
proposed fix

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)
(Assignee)

Updated

10 years ago
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.
(Assignee)

Comment 3

10 years ago
Created attachment 349770 [details] [diff] [review]
fix addressing comments

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)
(Assignee)

Updated

10 years ago
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.
(Assignee)

Comment 5

10 years ago
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...
(Assignee)

Comment 6

10 years ago
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.
(Assignee)

Comment 8

10 years ago
fix checked in.
Status: NEW → RESOLVED
Last Resolved: 10 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.