提交 e77dc1d1 编写于 作者: J Joao Moreno

Merge branch 'DeleteOutdatedExtension' of https://github.com/rebornix/vscode...

Merge branch 'DeleteOutdatedExtension' of https://github.com/rebornix/vscode into rebornix-DeleteOutdatedExtension
......@@ -180,10 +180,14 @@ export class UninstallAction extends Action {
this.enabled = false;
return this.extensionsService.uninstall(extension)
.then(() => this.onSuccess(extension), err => this.onError(err, extension))
.then(() => this.enabled = true)
.then(() => null);
return this.extensionsService.getInstalled().then(localExtensions => {
const [local] = localExtensions.filter(local => extensionEquals(local, extension));
return this.extensionsService.uninstall(local)
.then(() => this.onSuccess(local), err => this.onError(err, local))
.then(() => this.enabled = true)
.then(() => null);
});
}
private onSuccess(extension: IExtension) {
......@@ -204,7 +208,7 @@ export class UninstallAction extends Action {
private reportTelemetry(extension: IExtension, success: boolean) {
const data = assign(getTelemetryData(extension), { success });
this.telemetryService.publicLog('extensionGallery:uninstall', data);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册