fix 339391 loaded message scrolls back to top if incoming message is classified as junk, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2007-02-12 21:27:34 +00:00
parent ca0e3306d5
commit a6423d1251

View File

@ -2151,9 +2151,11 @@ function HandleJunkStatusChanged(folder)
var msgHdr = null;
if (GetNumSelectedMessages() == 1)
msgHdr = messenger.msgHdrFromURI(loadedMessage);
var junkBarWasDisplayed = gMessageNotificationBar.isFlagSet(kMsgNotificationJunkBar);
gMessageNotificationBar.setJunkMsg(msgHdr);
if (msgHdr)
// only reload message if junk bar display state has changed.
if (msgHdr && junkBarWasDisplayed != gMessageNotificationBar.isFlagSet(kMsgNotificationJunkBar))
{
// we may be forcing junk mail to be rendered with sanitized html. In that scenario, we want to
// reload the message if the status has just changed to not junk.