This commit is contained in:
Sandeep Somavarapu
2021-03-24 16:47:57 +01:00
parent e353502fb9
commit eb135ec46e
@@ -392,6 +392,14 @@ class Extensions extends Disposable {
return false;
}
private async syncInstalledExtensionWithGallery(extension: Extension): Promise<void> {
const compatible = await this.galleryService.getCompatibleExtension(extension.identifier);
if (compatible) {
extension.gallery = compatible;
this._onChange.fire({ extension });
}
}
private getInstalledExtensionMatchingGallery(gallery: IGalleryExtension): Extension | null {
for (const installed of this.installed) {
if (installed.uuid) { // Installed from Gallery
@@ -441,6 +449,9 @@ class Extensions extends Disposable {
}
}
this._onChange.fire(error || !extension ? undefined : { extension, operation: event.operation });
if (extension && !extension.gallery) {
this.syncInstalledExtensionWithGallery(extension);
}
}
private onUninstallExtension(identifier: IExtensionIdentifier): void {