Closed Bug 286761 Opened 20 years ago Closed 17 years ago

[rfe] change the RSS account icon ("globe") in the folderpane when a feed has new messages

Categories

(MailNews Core :: Feed Reader, enhancement)

x86
All
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspitzer, Assigned: Bienvenu)

References

Details

Attachments

(2 files, 1 obsolete file)

change RSS account icon in the folderpane when a feed has new messages, like imap and pop accounts do this already. currently, the "globe" icon (for RSS accounts) never changes. I'll attach a screen shot.
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird1.1
two things need to happen here 1) When an RSS message is added to a local mail folder, nsMsgMailboxParser::PublishMsgHeader calls nsMsgDatabase::AddNewHdrToDB which in turn sets a flag on the folder saying it has new mail: http://lxr.mozilla.org/mozilla/source/mailnews/db/msgdb/src/nsMsgDatabase.cpp#2967 but we never do anything for the root folder (i.e. the account). We could make an explicit call after the feed calls nsLocalFolder::AddMessage to make sure the server for that folder gets its biff state set correctly. 2) we need a new icon for the rss account icon that includes the biff indicator and appropriate CSS to hook it up.
Attached patch possible fix (obsolete) — Splinter Review
This manually sets the biff state on the folder after we add an rss message to it. Calling SetBiffState causes the folder to notify the root folder that it has new mail, and thus causing the correct biff datasource property to get set on the account folder. hopefully this call doesn't conflict too much with the work already being done in http://lxr.mozilla.org/mozilla/source/mailnews/db/msgdb/src/nsMsgDatabase.cpp#2967
Attachment #179978 - Flags: superreview?(bienvenu)
Comment on attachment 179978 [details] [diff] [review] possible fix It probably doesn't matter, but it might be nice to only do this once per feed download, instead of for every message. It might be better to do this after we've downloaded all the messages, in case a filter moved all the messages to some other account, by checking if the folder has new messages at the end of the download.
Attachment #179978 - Flags: superreview?(bienvenu) → superreview+
Attached patch a better fixSplinter Review
Follows your suggestion, checks to see if the folder has new messages, if it does, manually calls setBiffState. This fires after we have downloaded all of the items for a feed. If you have multiple feeds dumping into the same folder, we'll still end up making duplicate calls.
Attachment #179978 - Attachment is obsolete: true
Attachment #179989 - Flags: superreview?(bienvenu)
Comment on attachment 179989 [details] [diff] [review] a better fix great, thx.
Attachment #179989 - Flags: superreview?(bienvenu) → superreview+
fixed. I filed a spin off bug for getting an icon for the folder pane for RSS accounts with new mail. So you won't actually see anything different until that's fixed. Bug #289486 is about the artwork.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
one negative side effect of my patch is that i get the system new mail notification sound going off for every feed folder (that has new feeds) when I check my rss account for new articles. oops!
re-opening so i can fix the problem I reported above.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
see also bug #291478, which is the same issue but for the "Local Folders" account icon for new messages in the global inbox.
OS: Windows XP → All
QA Contact: rss
David, do we still need sr this?
this patch is checked in - I don't know if this is open because the bug still exists, or because it causes us to do the play the new mail sound for new rss messages.
Assignee: mscott → bienvenu
Status: REOPENED → NEW
Depends on: 323911
Certainly seems to be because of the sound, judging by comment 8 and comment 9, though nobody really realized it so we've had bug 323911 open on that all along. New bugs for regressions: they're a good thing.
Status: NEW → RESOLVED
Closed: 20 years ago17 years ago
Resolution: --- → FIXED
Component: RSS → Feed Reader
Product: Thunderbird → MailNews Core
Target Milestone: Thunderbird1.1 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: