Bug #269564 --> Views persist for regular folders, but not for virtual folders.

Persist views for single folder virtual folders.

sr=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2004-11-15 04:07:54 +00:00
Родитель f197e02f0b
Коммит dca7a472f9
2 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -1147,7 +1147,7 @@ function CreateGroupedSearchTerms(searchTermsArray)
return searchTermsArrayForQS;
}
var gViewDebug = true;
var gViewDebug = false;
function viewDebug(str)
{

Просмотреть файл

@ -121,6 +121,10 @@ var gSearchNotificationListener =
var msgdb = vFolder.getMsgDatabase(msgWindow);
msgdb.Commit(MSG_DB_LARGE_COMMIT);
// load the last used mail view for the folder...
var result = dbFolderInfo.getUint32Property("current-view", 0);
ViewChangeByValue(result);
// now that we have finished loading a virtual folder, scroll to the correct message
ScrollToMessageAfterFolderLoad(vFolder);
}
@ -618,6 +622,11 @@ function Search(str)
// from FolderLoaded in order to avoid moving focus into the search bar.
function loadVirtualFolder()
{
// bit of a hack...if the underlying real folder is loaded with the same view value
// as the value for the virtual folder being searched, then ViewChangeByValue
// fails to change the view because it thinks the view is already correctly loaded.
// so set gCurrentViewValue back to All.
gCurrentViewValue = 0;
onEnterInSearchBar();
}