Bug #362241 --> thread pane selection is lost when thunderbird compacts folders in the background. sr=bienvenu

git-svn-id: svn://10.0.0.236/trunk@217037 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org 2006-12-16 01:13:55 +00:00
parent be46cbbe58
commit 1f800eac06
2 changed files with 8 additions and 2 deletions

View File

@ -572,6 +572,14 @@ function HandleCompactCompleted(folder)
viewType = dbFolderInfo.viewType;
dbFolderInfo = null;
}
// before we reroot the folder, save off the currently displayed message
// so we can restore selection after re-rooting. For the manual compaction case,
// we've already saved this value off before we cleared the view and the thread pane.
// For the automatic folder compaction case, gDBView is still valid and we haven't
// saved off gCurrentlyDisplayedMessage yet.
if (gCurrentlyDisplayedMessage == nsMsgViewIndex_None && gDBView)
gCurrentlyDisplayedMessage = gDBView.currentlyDisplayedMessage;
RerootFolder(uri, msgFolder, viewType, viewFlags, sortType, sortOrder);
LoadCurrentlyDisplayedMessage();
}

View File

@ -167,9 +167,7 @@ function MsgCompactFolder(isAll)
if (expungedBytes > 0)
{
if (gDBView)
{
gCurrentlyDisplayedMessage = gDBView.currentlyDisplayedMessage;
}
ClearThreadPaneSelection();
ClearThreadPane();