提交 e7b4f7cc 编写于 作者: M Michel Kaporin

Resolve integrity optimistically if integrity service has not resolved it in time.

上级 12e07d54
......@@ -677,10 +677,21 @@ export class ReportIssueAction extends Action {
super(id, label);
}
private _optimisticIsPure(): TPromise<boolean> {
let isPure = true;
let integrityPromise = this.integrityService.isPure().then(res => {
isPure = res.isPure;
});
return TPromise.any([TPromise.timeout(100), integrityPromise]).then(() => {
return isPure;
});
}
public run(): TPromise<boolean> {
return this.integrityService.isPure().then(res => {
return this._optimisticIsPure().then(isPure => {
return this.extensionManagementService.getInstalled(LocalExtensionType.User).then(extensions => {
const issueUrl = this.generateNewIssueUrl(product.reportIssueUrl, pkg.name, pkg.version, product.commit, product.date, res.isPure, extensions);
const issueUrl = this.generateNewIssueUrl(product.reportIssueUrl, pkg.name, pkg.version, product.commit, product.date, isPure, extensions);
window.open(issueUrl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册