From f9b418c3e1605d3ef646b5ba8b355e623669c026 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Wed, 17 Aug 2005 08:58:57 +0000 Subject: [PATCH] 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 --- mozilla/mail/base/content/mailCommands.js | 15 +++++++++++---- .../base/resources/content/mailCommands.js | 10 +++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/mozilla/mail/base/content/mailCommands.js b/mozilla/mail/base/content/mailCommands.js index 3c6c21df4f1..b039bf360eb 100644 --- a/mozilla/mail/base/content/mailCommands.js +++ b/mozilla/mail/base/content/mailCommands.js @@ -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() diff --git a/mozilla/mailnews/base/resources/content/mailCommands.js b/mozilla/mailnews/base/resources/content/mailCommands.js index 39876b0baa2..cf22b519b0d 100644 --- a/mozilla/mailnews/base/resources/content/mailCommands.js +++ b/mozilla/mailnews/base/resources/content/mailCommands.js @@ -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); }