Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Simmonds <bsimmond@student.ethz.ch>2022-09-20 17:07:09 +0300
committerBenjamin Simmonds <bsimmond@student.ethz.ch>2022-09-20 17:07:09 +0300
commit5b0079af2f9ba363b88563c16bbfdee534514a1e (patch)
tree477504d98693d11cdffd0a34ff1c6dab6b332be0
parent662827b16c1bdc95a0655d8bdabe01b89eb4235b (diff)
-rw-r--r--src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
index d946a694e9f..b0b20e1f260 100644
--- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
+++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
@@ -803,8 +803,28 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
}
private updateRunningExtensions(): void {
- this.extensionService.getExtensions().then(runningExtensions => {
+ this.extensionService.getExtensions().then(async runningExtensions => {
+ const deltaExtensionsDescription: IExtensionDescription[] = [];
+ deltaExtensionsDescription.push(...runningExtensions.filter(e => !this.runningExtensions?.includes(e)));
+ if (this.runningExtensions) {
+ deltaExtensionsDescription.push(...this.runningExtensions.filter(e => !runningExtensions.includes(e)));
+ }
this.runningExtensions = runningExtensions;
+
+ const installed = this.installed;
+ const deltaExtensions: IExtension[] = [];
+ const extsNotInstalled: IExtensionInfo[] = [];
+ for (const desc of deltaExtensionsDescription) {
+ const extension = installed.find(e => e.identifier.id === desc.id);
+ if (extension) {
+ deltaExtensions.push(extension);
+ }
+ else {
+ extsNotInstalled.push({ id: desc.identifier.value, uuid: desc.uuid });
+ }
+ }
+ deltaExtensions.push(...await this.getExtensions(extsNotInstalled, CancellationToken.None));
+ deltaExtensions.forEach(e => this._onChange.fire(e));
});
}