Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to hide/show release notes on update #44020 #44271

Merged
merged 1 commit into from
Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/vs/platform/update/node/update.config.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ configurationRegistry.registerConfiguration({
'type': 'boolean',
'default': product.quality === 'insider',
'description': nls.localize('enableWindowsBackgroundUpdates', "Enables Windows background updates.")
},
'update.showReleaseNotes': {
'type': 'boolean',
'default': true,
'description': nls.localize('showReleaseNotes', "Show Release Notes on update")
}
}
});
7 changes: 5 additions & 2 deletions src/vs/workbench/parts/update/electron-browser/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import * as semver from 'semver';
import { OS } from 'vs/base/common/platform';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';

const NotNowAction = new Action(
'update.later',
Expand Down Expand Up @@ -176,12 +177,14 @@ export class ProductContribution implements IWorkbenchContribution {
@IInstantiationService instantiationService: IInstantiationService,
@INotificationService notificationService: INotificationService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService,
@IEnvironmentService environmentService: IEnvironmentService
@IEnvironmentService environmentService: IEnvironmentService,
@IConfigurationService configurationService: IConfigurationService
) {
const lastVersion = storageService.get(ProductContribution.KEY, StorageScope.GLOBAL, '');
const showReleaseNotes = configurationService.getValue<boolean>('update.showReleaseNotes');

// was there an update? if so, open release notes
if (!environmentService.skipReleaseNotes && product.releaseNotesUrl && lastVersion && pkg.version !== lastVersion) {
if (showReleaseNotes && !environmentService.skipReleaseNotes && product.releaseNotesUrl && lastVersion && pkg.version !== lastVersion) {
instantiationService.invokeFunction(loadReleaseNotes, pkg.version).then(
text => editorService.openEditor(instantiationService.createInstance(ReleaseNotesInput, pkg.version, text), { pinned: true }),
() => {
Expand Down