Skip to content

Commit a0f904d

Browse files
authored
only show update release notes in stable (microsoft#187908)
1 parent 4221074 commit a0f904d

File tree

1 file changed

+18
-16
lines changed
  • src/vs/workbench/contrib/update/browser

1 file changed

+18
-16
lines changed

src/vs/workbench/contrib/update/browser/update.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -458,23 +458,25 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
458458
when: CONTEXT_UPDATE_STATE.isEqualTo(StateType.Updating)
459459
});
460460

461-
CommandsRegistry.registerCommand('update.showUpdateReleaseNotes', () => {
462-
if (this.updateService.state.type !== StateType.Ready) {
463-
return;
464-
}
461+
if (this.productService.quality === 'stable') {
462+
CommandsRegistry.registerCommand('update.showUpdateReleaseNotes', () => {
463+
if (this.updateService.state.type !== StateType.Ready) {
464+
return;
465+
}
465466

466-
const version = this.updateService.state.update.version;
467-
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, version));
468-
});
469-
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
470-
group: '7_update',
471-
order: 1,
472-
command: {
473-
id: 'update.showUpdateReleaseNotes',
474-
title: nls.localize('showUpdateReleaseNotes', "Show Update Release Notes")
475-
},
476-
when: ContextKeyExpr.and(CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready), MAJOR_MINOR_UPDATE_AVAILABLE)
477-
});
467+
const version = this.updateService.state.update.version;
468+
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, version));
469+
});
470+
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
471+
group: '7_update',
472+
order: 1,
473+
command: {
474+
id: 'update.showUpdateReleaseNotes',
475+
title: nls.localize('showUpdateReleaseNotes', "Show Update Release Notes")
476+
},
477+
when: ContextKeyExpr.and(CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready), MAJOR_MINOR_UPDATE_AVAILABLE)
478+
});
479+
}
478480

479481
CommandsRegistry.registerCommand('update.restart', () => this.updateService.quitAndInstall());
480482
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {

0 commit comments

Comments
 (0)