Bug 371074 Full rebuild isn't always triggered when excludeQueries is set (r=mano)

This commit is contained in:
dietrich%mozilla.com 2007-06-13 03:08:00 +00:00
Родитель 15e4709454
Коммит a6899ba420
1 изменённых файлов: 7 добавлений и 6 удалений

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

@ -3113,7 +3113,7 @@ nsNavHistoryFolderResultNode::OnItemRemoved(PRInt64 aItemId,
NS_ASSERTION(aParentFolder == mItemId, "Got wrong bookmark update");
if (!node->IsFolder() && mOptions->ExcludeItems()) {
if ((node->IsURI() || node->IsSeparator()) && mOptions->ExcludeItems()) {
// don't update items when we aren't displaying them, but we do need to
// adjust everybody's bookmark indices to account for the removal
ReindexRange(aIndex, PR_INT32_MAX, -1);
@ -3138,16 +3138,17 @@ nsNavHistoryFolderResultNode::OnItemChanged(PRInt64 aItemId,
PRBool aIsAnnotationProperty,
const nsACString& aValue)
{
if (mOptions->ExcludeItems())
return NS_OK; // don't update items when we aren't displaying them
if (!StartIncrementalUpdate())
return NS_OK;
PRUint32 nodeIndex;
nsNavHistoryResultNode* node = FindChildById(aItemId, &nodeIndex);
if (!node)
return NS_ERROR_FAILURE;
if ((node->IsURI() || node->IsSeparator()) && mOptions->ExcludeItems())
return NS_OK; // don't update items when we aren't displaying them
if (!StartIncrementalUpdate())
return NS_OK;
if (aProperty.EqualsLiteral("title")) {
node->mTitle = aValue;
}