fix 352287 crash clicking back and forth between saved search with view and normal folder, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2006-09-20 01:07:11 +00:00
parent 6284bae366
commit 8963c4e9a7

View File

@ -262,16 +262,17 @@ nsMsgQuickSearchDBView::OnSearchDone(nsresult status)
}
nsMsgKey *staleHits;
PRUint32 numBadHits;
m_db->RefreshCache(searchUri, m_hdrHits.Count(), keyArray.GetArray(), &numBadHits, &staleHits);
for (i = 0; i < numBadHits; i++)
if (m_db)
{
nsMsgViewIndex staleHitIndex = FindKey(staleHits[i], PR_TRUE);
if (staleHitIndex != nsMsgViewIndex_None)
RemoveByIndex(staleHitIndex);
m_db->RefreshCache(searchUri, m_hdrHits.Count(), keyArray.GetArray(), &numBadHits, &staleHits);
for (i = 0; i < numBadHits; i++)
{
nsMsgViewIndex staleHitIndex = FindKey(staleHits[i], PR_TRUE);
if (staleHitIndex != nsMsgViewIndex_None)
RemoveByIndex(staleHitIndex);
}
delete [] staleHits;
}
delete [] staleHits;
// we also need to add new hits - should we have RefreshCache calculate these?
// or just look through the view for each hit to see if we're already displaying it?
}
if (m_sortType != nsMsgViewSortType::byThread)//we do not find levels for the results.
{