mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 378802 - Changing the details of a bookmark does not sort results in which it's listed. r=dietrich.
This commit is contained in:
parent
e1a49a1bec
commit
e6692e3d56
@ -3020,8 +3020,24 @@ nsNavHistoryFolderResultNode::OnItemChanged(PRInt64 aBookmarkId, nsIURI* aBookma
|
|||||||
|
|
||||||
nsNavHistoryResult* result = GetResult();
|
nsNavHistoryResult* result = GetResult();
|
||||||
NS_ENSURE_TRUE(result, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(result, NS_ERROR_FAILURE);
|
||||||
if (result->GetView())
|
|
||||||
|
if (result->GetView()) {
|
||||||
result->GetView()->ItemChanged(node);
|
result->GetView()->ItemChanged(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
// DO NOT OPTIMIZE THIS TO CHECK aProperty
|
||||||
|
// the sorting methods fall back to each other so we need to re-sort the
|
||||||
|
// result even if it's not set to sort by the given property
|
||||||
|
SortComparator comparator = GetSortingComparator(GetSortType());
|
||||||
|
nsCAutoString sortingAnnotation;
|
||||||
|
GetSortingAnnotation(sortingAnnotation);
|
||||||
|
if (DoesChildNeedResorting(nodeIndex, comparator, sortingAnnotation.get())) {
|
||||||
|
RemoveChildAt(nodeIndex, PR_TRUE);
|
||||||
|
InsertChildAt(node,
|
||||||
|
FindInsertionPoint(node, comparator, sortingAnnotation.get()),
|
||||||
|
PR_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user