提交 69e75ec1 编写于 作者: I isidor

explorer: do not always recursvily refresh

上级 a8520a86
...@@ -350,15 +350,17 @@ export class ExplorerView extends ViewletPanel { ...@@ -350,15 +350,17 @@ export class ExplorerView extends ViewletPanel {
/** /**
* Refresh the contents of the explorer to get up to date data from the disk about the file structure. * Refresh the contents of the explorer to get up to date data from the disk about the file structure.
* If the item is passed we refresh only that level of the tree, otherwise we do a full refresh.
*/ */
refresh(item?: ExplorerItem): Promise<void> { refresh(item?: ExplorerItem): Promise<void> {
if (!this.tree || !this.isBodyVisible()) { if (!this.tree || !this.isBodyVisible()) {
this.shouldRefresh = true; this.shouldRefresh = true;
return Promise.resolve(undefined); return Promise.resolve(undefined);
} }
const recursive = !item;
const toRefresh = item || this.tree.getInput(); const toRefresh = item || this.tree.getInput();
return this.tree.refresh(toRefresh, true); return this.tree.refresh(toRefresh, recursive);
} }
getOptimalWidth(): number { getOptimalWidth(): number {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册