Bug 594090 Delete in Advanced Search window only works once r=Mnyromyr
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Thu, 10 Mar 2011 00:43:48 +0000
changeset 7296 a5df7cbbe13f1ea59979e825fe01cf9122ed161e
parent 7295 27f43f536cb220cac51eebda75687f53cbf1b348
child 7297 407379b3fee96a95223ad20318f0d9a84a8dc60b
push idunknown
push userunknown
push dateunknown
reviewersMnyromyr
bugs594090
Bug 594090 Delete in Advanced Search window only works once r=Mnyromyr
suite/mailnews/search/SearchDialog.js
--- a/suite/mailnews/search/SearchDialog.js
+++ b/suite/mailnews/search/SearchDialog.js
@@ -619,21 +619,23 @@ function MsgDeleteSelectedMessages(aComm
 
 function SetNextMessageAfterDelete()
 {
   gNextMessageViewIndexAfterDelete = gSearchView.msgToSelectAfterDelete;
 }
 
 function HandleDeleteOrMoveMessageFailed(folder)
 {
+  gSearchView.onDeleteCompleted(false);
   gNextMessageViewIndexAfterDelete = -2;
 }
 
 function HandleDeleteOrMoveMessageCompleted(folder)
 {
+  gSearchView.onDeleteCompleted(true);
   var treeView = gSearchView.QueryInterface(Components.interfaces.nsITreeView);
   var treeSelection = treeView.selection;
   var viewSize = treeView.rowCount;
 
   if (gNextMessageViewIndexAfterDelete == -2) {
     // a move or delete can cause our selection can change underneath us.
     // this can happen when the user
     // deletes message from the stand alone msg window