121359 r=cavin sr=bienvenu. when exiting out of quick search scroll to first new msg if nothing to select.

This commit is contained in:
naving%netscape.com 2002-08-07 03:22:08 +00:00
parent c94dcde801
commit dbe8b279ce

View File

@ -139,6 +139,15 @@ NS_IMETHODIMP nsMsgThreadedDBView::ReloadFolderAfterQuickSearch()
RestoreSelection(&preservedSelection); RestoreSelection(&preservedSelection);
if (preservedSelection.GetSize() == 0)
{
nsMsgViewIndex resultIndex;
nsMsgKey resultKey;
nsMsgViewIndex threadIndex;
ViewNavigate(nsMsgNavigationType.firstNew, &resultKey, &resultIndex, &threadIndex, PR_TRUE);
if (mTree && resultKey != nsMsgKey_None && resultIndex != nsMsgViewIndex_None)
mTree->EnsureRowIsVisible(resultIndex);
}
return rv; return rv;
} }