Closed Bug 250698 Opened 21 years ago Closed 21 years ago

make nsIMsgCopyService.CopyFileMessage useful for arbitrary folders

Categories

(MailNews Core :: Feed Reader, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: myk)

Details

Attachments

(1 file)

It would be useful to be able to use nsIMsgCopyService.CopyFileMessage() to copy new feed stories into folders, since that method supports IMAP as well as local/POP folders, but a call to that method eventually calls nsImapProtocol::OnAppendMsgFromFile(), which expects messages to be destined for the Sent, Templates, or Drafts folder and marks them read by default. The fix for bug 198087 modified nsImapMailFolder::GetCurMoveCopyMessageFlags() to override this default for the Drafts folder to make drafts more noticable. We should override the default for other folders as well.
This patch changes the default read state for messages copied from files to IMAP folders to "unread" and then overrides that default for the Sent and Templates folders (previously the default was "read" and the default got overridden for the Drafts folder). With the patch applied, composed messages copied to the Drafts, Templates, and Sent folders continue to get marked unread, read, and read, respectively. Messages copied to other folders, however (f.e. in the latest development version of Forumzilla) get marked unread.
Assignee: mscott → myk
Status: NEW → ASSIGNED
Comment on attachment 152734 [details] [diff] [review] patch v1: defaults to unread for folders besides Sent and Templates David, can you take a look at this patch?
Attachment #152734 - Flags: review?(bienvenu)
I'm not sure I understand - I can copy news feed messages into imap folders, and they don't get marked read in the imap folder. Why do you want to use CopyFileMessage instead of CopyMessages? It seems like more of a hassle to get your messages into a file than it would be to directly copy them out of the local folder they're already in...
(In reply to comment #3) > I'm not sure I understand - I can copy news feed messages into imap folders, > and they don't get marked read in the imap folder. Why do you want to use > CopyFileMessage instead of CopyMessages? It seems like more of a hassle to get > your messages into a file than it would be to directly copy them out of the > local folder they're already in... CopyMessages only works on messages that are already in a local folder. I'm talking about copying feed messages directly into IMAP folders after downloading them instead of writing them to a local folder first. The requirement that feed stories be downloaded into a local folder is a significant limitation of the current feed reading implementation, since many users live in IMAP accounts and don't use their Local Folders account for anything. The current implementation prevents such users from getting feed mail where they get their other mail and forces them to use Local Folders, which eats up five lines of their folder pane with unnecessary special folders (Drafts, Templates, etc.). If the feed reading feature were to use CopyFileMessage to write feed messages into folders instead of writing them to a local folder via addMessages, it would let users download feed messages into any folder of their choosing, whether local or IMAP, remove this limitation and dependency on the Local Folders account. CopyFileMessage works great for copying feed messages into folders, except for one problem: the messages get marked read when copied into IMAP folders. That's a general bug, not specific to feed reading, since CopyFileMessage is designed to let you copy messages into any folder, but OnAppendMsgFromFile assumes you're copying them into Sent, Templates, or Drafts (since that's what it's been used for in the past) and does the wrong thing when you copy them into any other folder. OnAppendMsgFromFile should not make that assumption and should do the right thing when messages are copied into other folders, not only for feed reading but for any other enhancement that wants to copy messages from files into arbitrary folders in the future.
Comment on attachment 152734 [details] [diff] [review] patch v1: defaults to unread for folders besides Sent and Templates OK, thx, I just wanted to make sure I understood what you were doing...
Attachment #152734 - Flags: review?(bienvenu) → review+
Comment on attachment 152734 [details] [diff] [review] patch v1: defaults to unread for folders besides Sent and Templates Seth, does this look good to you?
Attachment #152734 - Flags: superreview?(sspitzer)
Comment on attachment 152734 [details] [diff] [review] patch v1: defaults to unread for folders besides Sent and Templates Seth says sr=seth
Attachment #152734 - Flags: superreview?(sspitzer) → superreview+
fix checked in (branch and trunk). Sorry it took a while Myk. The trunk has been closed for a smoketest blocker until tonight.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird0.8
Component: RSS → Feed Reader
Product: Thunderbird → MailNews Core
Target Milestone: Thunderbird0.8 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: