Skip to content

Commit

Permalink
Revert "Fix #127621"
Browse files Browse the repository at this point in the history
This reverts commit 07a0575.
  • Loading branch information
chrmarti committed Jul 1, 2021
1 parent ac1c2ea commit 1fc68f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/vs/workbench/contrib/search/browser/searchView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,26 +510,25 @@ export class SearchView extends ViewPane {
}

refreshTree(event?: IChangeEvent): void {
const setChildrenOpts = { diffIdentityProvider: { getId(element: RenderableMatch) { return element.id; } } };
const collapseResults = this.searchConfig.collapseResults;
if (!event || event.added || event.removed) {
// Refresh whole tree
if (this.searchConfig.sortOrder === SearchSortOrder.Modified) {
// Ensure all matches have retrieved their file stat
this.retrieveFileStats()
.then(() => this.tree.setChildren(null, this.createResultIterator(collapseResults), setChildrenOpts));
.then(() => this.tree.setChildren(null, this.createResultIterator(collapseResults)));
} else {
this.tree.setChildren(null, this.createResultIterator(collapseResults), setChildrenOpts);
this.tree.setChildren(null, this.createResultIterator(collapseResults));
}
} else {
// If updated counts affect our search order, re-sort the view.
if (this.searchConfig.sortOrder === SearchSortOrder.CountAscending ||
this.searchConfig.sortOrder === SearchSortOrder.CountDescending) {
this.tree.setChildren(null, this.createResultIterator(collapseResults), setChildrenOpts);
this.tree.setChildren(null, this.createResultIterator(collapseResults));
} else {
// FileMatch modified, refresh those elements
event.elements.forEach(element => {
this.tree.setChildren(element, this.createIterator(element, collapseResults), setChildrenOpts);
this.tree.setChildren(element, this.createIterator(element, collapseResults));
this.tree.rerender(element);
});
}
Expand Down

0 comments on commit 1fc68f3

Please sign in to comment.