Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -434,7 +434,9 @@ export class NotificationTemplateRenderer {
const action = notification.actions.primary[index];
button.label = action.label;
this.inputDisposeables.push(button.onDidClick(() => {
this.inputDisposeables.push(button.onDidClick(e => {
e.preventDefault();
e.stopPropagation();
// Run action
this.actionRunner.run(action, notification);
@@ -454,7 +456,7 @@ export class NotificationTemplateRenderer {
// Return early if the item has no progress
if (!notification.hasProgress()) {
this.template.progress.stop().getContainer().hide();
this.template.progress.stop().hide();
return;
}
@@ -462,23 +464,23 @@ export class NotificationTemplateRenderer {
// Infinite
const state = notification.progress.state;
if (state.infinite) {
this.template.progress.infinite().getContainer().show();
this.template.progress.infinite().show();
}
// Total / Worked
else if (state.total || state.worked) {
if (state.total) {
else if (typeof state.total === 'number' || typeof state.worked === 'number') {
if (typeof state.total === 'number' && !this.template.progress.hasTotal()) {
this.template.progress.total(state.total);
}
if (state.worked) {
this.template.progress.worked(state.worked).getContainer().show();
if (typeof state.worked === 'number') {
this.template.progress.worked(state.worked).show();
}
}
// Done
else {
this.template.progress.done().getContainer().hide();
this.template.progress.done().hide();
}
}