Skip to content

Commit

Permalink
improve user setup background update flow
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Jun 22, 2018
1 parent af81144 commit fc38f66
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/vs/workbench/parts/update/electron-browser/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export class UpdateContribution implements IGlobalActivity {
);
}

// windows fast updates
// windows fast updates (target === system)
private onUpdateDownloaded(update: IUpdate): void {
if (!this.shouldShowNotification()) {
return;
Expand Down Expand Up @@ -377,6 +377,11 @@ export class UpdateContribution implements IGlobalActivity {

// windows fast updates
private onUpdateUpdating(update: IUpdate): void {
if (isWindows && product.target === 'user') {
return;
}

// windows fast updates (target === system)
const neverShowAgain = new NeverShowAgain('update/win32-fast-updates', this.storageService);

if (!neverShowAgain.shouldShow()) {
Expand All @@ -399,10 +404,11 @@ export class UpdateContribution implements IGlobalActivity {

// windows and mac
private onUpdateReady(update: IUpdate): void {
if (!isWindows && !this.shouldShowNotification()) {
if (!(isWindows && product.target !== 'user') && !this.shouldShowNotification()) {
return;
}

// windows user fast updates and mac
this.notificationService.prompt(
severity.Info,
nls.localize('updateAvailableAfterRestart', "Restart {0} to apply the latest update.", product.nameLong),
Expand Down

0 comments on commit fc38f66

Please sign in to comment.