This commit is contained in:
Jackson Kearl 2022-05-27 12:30:17 -07:00 committed by GitHub
parent a054b98fd4
commit d9225482fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -125,10 +125,10 @@ export class ExplorerService implements IExplorerService {
this.view.setTreeInput();
}
}));
// Refresh explorer when window gets focus to compensate for missing file events #126817
const skipRefreshExplorerOnWindowFocus = this.configurationService.getValue('skipRefreshExplorerOnWindowFocus');
this.disposables.add(hostService.onDidChangeFocus(hasFocus => {
if (!skipRefreshExplorerOnWindowFocus && hasFocus) {
if (hasFocus) {
this.refresh(false);
}
}));

View file

@ -84,10 +84,10 @@ function hasExpandedRootChild(tree: WorkbenchCompressibleAsyncDataTree<ExplorerI
const identityProvider = {
getId: (stat: ExplorerItem) => {
if (stat instanceof NewExplorerItem) {
return `new:${stat.resource}`;
return `new:${stat.getId()}`;
}
return stat.resource;
return stat.getId();
}
};

View file

@ -188,7 +188,7 @@ export class ExplorerItem {
}
getId(): string {
return this.resource.toString();
return this.root.resource.toString() + '::' + this.resource.toString();
}
toString(): string {