From c744d9933d821e534b51cf2701b5640a87170af3 Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Tue, 19 Sep 2006 18:39:10 +0000 Subject: [PATCH] fix interaction between views and virtual folders that was resulting in matching messages not getting displayed, 351867, sr=mscott git-svn-id: svn://10.0.0.236/trunk@212004 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/searchBar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/mail/base/content/searchBar.js b/mozilla/mail/base/content/searchBar.js index 39ebbfe1754..184db33c42d 100644 --- a/mozilla/mail/base/content/searchBar.js +++ b/mozilla/mail/base/content/searchBar.js @@ -117,7 +117,11 @@ var gSearchNotificationListener = // load the last used mail view for the folder... var result = dbFolderInfo.getUint32Property("current-view", 0); - ViewChangeByValue(result); + // do this on a timeout so that we don't issue a new search + // synchronously with the previous search's onSearchDone notification + // because that can cause a confusing sequence of onSearchDone and + // onNewSearch notifications. + setTimeout('ViewChangeByValue('+result+')', 0); // now that we have finished loading a virtual folder, scroll to the correct message ScrollToMessageAfterFolderLoad(vFolder);