Bug 220933 Manually marking message as Junk should mark it Read as well

patch by jens.b@web.de r=bienvenu sr=dmose


git-svn-id: svn://10.0.0.236/trunk@177936 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2005-08-17 08:58:57 +00:00
parent 3440378463
commit f9b418c3e1
2 changed files with 16 additions and 9 deletions

View File

@@ -744,10 +744,17 @@ function filterFolderForJunk()
function JunkSelectedMessages(setAsJunk)
{
MsgJunkMailInfo(true);
gDBView.doCommand(setAsJunk ? nsMsgViewCommandType.junk : nsMsgViewCommandType.unjunk);
// XXX TODO
// consider whether these messages should be
// marked as read (if markAsReadOnSpam is set)
// When the user explicitly marks a message as junk, he doesn't want it to
// stay unread (even if he does want that for automatically-classified ones),
// so we always mark as read here (pref-independent, see bug 220933).
// Note that this behaviour should match the one in the back end for marking
// as junk via clicking the 'junk' column.
if (setAsJunk)
MarkSelectedMessagesRead(true);
gDBView.doCommand(setAsJunk ? nsMsgViewCommandType.junk
: nsMsgViewCommandType.unjunk);
}
function deleteJunkInFolder()

View File

@@ -686,17 +686,17 @@ function filterFolderForJunk()
function JunkSelectedMessages(setAsJunk)
{
MsgJunkMailInfo(true);
MsgJunkMailInfo(true);
// When the user explicitly marks a message as junk, he doesn't want it to
// stay unread (even if he does want that for automatically-classified ones),
// so we always mark as read here (pref-independent, see bug 220933).
// Note that this behaviour should match the one in the back end for marking
// as junk via clicking the 'junk' column.
if (setAsJunk)
MarkSelectedMessagesRead(true);
gDBView.doCommand(setAsJunk ? nsMsgViewCommandType.junk
MarkSelectedMessagesRead(true);
gDBView.doCommand(setAsJunk ? nsMsgViewCommandType.junk
: nsMsgViewCommandType.unjunk);
}