提交 8550d8f2 编写于 作者: J Joao Moreno

extension actions: more fixes

上级 b09cdc7e
......@@ -269,6 +269,10 @@ export class CombinedInstallAction extends Action {
this.enabled = true;
this.label = this.uninstallAction.label;
this.class = this.uninstallAction.class;
} else if (this.extension.state === ExtensionState.Installing) {
this.enabled = false;
this.label = this.installAction.label;
this.class = this.installAction.class;
} else {
this.enabled = false;
}
......
......@@ -127,7 +127,11 @@ export class ExtensionsModel {
return extension;
});
return this.installed;
const installing = this.installing
.filter(e => !this.installed.some(installed => installed.local.id === e.id))
.map(e => e.extension);
return [...this.installed, ...installing];
});
}
......@@ -178,7 +182,7 @@ export class ExtensionsModel {
}
const ext = extension as Extension;
const local = ext.local;
const local = ext.local || this.installed.filter(e => e.local.metadata && ext.gallery && e.local.metadata.id === ext.gallery.id)[0].local;
if (!local) {
return TPromise.wrapError<void>(new Error('Missing local'));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册