Bug 324590 r=bryner Make folders update properly when sorting is active

Original committer: brettw%gmail.com
Original revision: 1.56
Original date: 2006/02/28 16:41:03
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 18:30:21 +00:00
Родитель 036fb5e11c
Коммит a0de0215ae
1 изменённых файлов: 12 добавлений и 2 удалений

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

@ -2681,7 +2681,12 @@ nsNavHistoryFolderResultNode::OnItemAdded(nsIURI* aBookmark, PRInt64 aFolder,
nsresult rv = history->UriToResultNode(aBookmark, mOptions, &node);
NS_ENSURE_SUCCESS(rv, rv);
return InsertChildAt(node, aIndex);
if (GetSortType() == nsINavHistoryQueryOptions::SORT_BY_NONE) {
// insert at natural bookmarks position
return InsertChildAt(node, aIndex);
}
// insert at sorted position
return InsertSortedChild(node, PR_FALSE);
}
@ -2888,7 +2893,12 @@ nsNavHistoryFolderResultNode::OnFolderAdded(PRInt64 aFolder, PRInt64 aParent,
nsresult rv = bookmarks->ResultNodeForFolder(aFolder, mOptions, &node);
NS_ENSURE_SUCCESS(rv, rv);
return InsertChildAt(node, aIndex);
if (GetSortType() == nsINavHistoryQueryOptions::SORT_BY_NONE) {
// insert at natural bookmarks position
return InsertChildAt(node, aIndex);
}
// insert at sorted position
return InsertSortedChild(node, PR_FALSE);
}