From 30bb10ee3b0de47943270fecfd8e5ae548943897 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Thu, 6 Jan 2000 00:54:09 +0000 Subject: [PATCH] Bug #22960 --> fix an inefficiency when deleting a message...we were clearing the message pane and msg header view overlay twice every time we deleted a msg...this helps make deleting look faster...The fix is to not clear the msg pane every time selection changes in the thread pane.. instead only clear the msg pane when the folder selection changes.. git-svn-id: svn://10.0.0.236/trunk@56909 18797224-902f-48f8-a5cc-f745e15eee43 --- .../mailnews/base/resources/content/commandglue.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mozilla/mailnews/base/resources/content/commandglue.js b/mozilla/mailnews/base/resources/content/commandglue.js index f2d840fe12c..17d6a5059cf 100644 --- a/mozilla/mailnews/base/resources/content/commandglue.js +++ b/mozilla/mailnews/base/resources/content/commandglue.js @@ -415,18 +415,27 @@ function LoadSelectionIntoMessagePane() if ( selArray && (selArray.length == 1) ) LoadMessage(selArray[0]); else - ClearMessagePane(); + { + // don't necessarily clear the message pane...if you uncomment this, + // you'll be introducing a large inefficiency when deleting messages...as deleting + // a msg brings us here twice...so we end up clearing the message pane twice for no + // good reason... + // ClearMessagePane(); + } } function FolderPaneSelectionChange() { var tree = GetFolderTree(); - if(tree) { var selArray = tree.selectedItems; if ( selArray && (selArray.length == 1) ) + { ChangeFolderByDOMNode(selArray[0]); + // explicitly force the message pane to get cleared when we switch folders + ClearMessagePane(); + } else { var threadTree = GetThreadTree();