提交 5983f1e1 编写于 作者: R Rob Lourens

search - Remove unused change event cases

上级 d1952066
......@@ -446,21 +446,13 @@ export class SearchView extends ViewletPanel {
refreshTree(event?: IChangeEvent): void {
const collapseResults = this.configurationService.getValue<ISearchConfigurationProperties>('search').collapseResults;
if (!event || event.added || event.removed) {
// Refresh whole tree
this.tree.setChildren(null, this.createResultIterator(collapseResults));
} else {
// FileMatch modified, refresh those elements
event.elements.forEach(element => {
if (element instanceof BaseFolderMatch) {
// The folder may or may not be in the tree. Refresh the whole thing.
this.tree.setChildren(null, this.createResultIterator(collapseResults));
return;
}
if (element instanceof SearchResult) {
this.tree.setChildren(null, this.createIterator(element, collapseResults));
} else {
this.tree.setChildren(element, this.createIterator(element, collapseResults));
this.tree.rerender(element);
}
this.tree.setChildren(element, this.createIterator(element, collapseResults));
this.tree.rerender(element);
});
}
}
......
......@@ -400,7 +400,7 @@ export class FileMatch extends Disposable implements IFileMatch {
}
export interface IChangeEvent {
elements: (FileMatch | FolderMatch | SearchResult)[];
elements: FileMatch[];
added?: boolean;
removed?: boolean;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册