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

Option to not receive extension updates #54612

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Disable auto-update if recieve update id disabled
  • Loading branch information
ramya-rao-a committed Jul 18, 2018
commit ebfb97601a5233307101eac6e70eb82376af2f20
4 changes: 2 additions & 2 deletions src/vs/workbench/parts/extensions/common/extensions.ts
Original file line number Diff line number Diff line change
@@ -98,12 +98,12 @@ export const ConfigurationKey = 'extensions';
export const AutoUpdateConfigurationKey = 'extensions.autoUpdate';
export const ShowRecommendationsOnlyOnDemandKey = 'extensions.showRecommendationsOnlyOnDemand';
export const CloseExtensionDetailsOnViewChangeKey = 'extensions.closeExtensionDetailsOnViewChange';
export const RecievesUpdatesConfigurationKey = 'extensions.recieveUpdates';
export const ReceivesUpdatesConfigurationKey = 'extensions.receiveUpdates';

export interface IExtensionsConfiguration {
autoUpdate: boolean;
ignoreRecommendations: boolean;
showRecommendationsOnlyOnDemand: boolean;
closeExtensionDetailsOnViewChange: boolean;
recieveUpdates: boolean;
receiveUpdates: boolean;
}
Original file line number Diff line number Diff line change
@@ -223,9 +223,9 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
description: localize('extensionsCloseExtensionDetailsOnViewChange', "If set to true, editors with extension details will be automatically closed upon navigating away from the Extensions View."),
default: false
},
'extensions.recieveUpdates': {
'extensions.receiveUpdates': {
type: 'boolean',
description: localize('extensionsRecieveUpdates', "Configure whether you receive updates for outdated extensions."),
description: localize('extensionsReceiveUpdates', "If set to true, updates for outdated installed extensions will be fetched. If set to false, extension auto-update feature is disabled regardless of the value for the extensions.autoUpdate setting"),
default: true
}
}
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { IWindowService } from 'vs/platform/windows/common/windows';
import Severity from 'vs/base/common/severity';
import URI from 'vs/base/common/uri';
import { IExtension, IExtensionDependencies, ExtensionState, IExtensionsWorkbenchService, AutoUpdateConfigurationKey, RecievesUpdatesConfigurationKey } from 'vs/workbench/parts/extensions/common/extensions';
import { IExtension, IExtensionDependencies, ExtensionState, IExtensionsWorkbenchService, AutoUpdateConfigurationKey, ReceivesUpdatesConfigurationKey } from 'vs/workbench/parts/extensions/common/extensions';
import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { IURLService, IURLHandler } from 'vs/platform/url/common/url';
import { ExtensionsInput } from 'vs/workbench/parts/extensions/common/extensionsInput';
@@ -410,12 +410,12 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService,
urlService.registerHandler(this);

this.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration(AutoUpdateConfigurationKey)) {
if (e.affectsConfiguration(AutoUpdateConfigurationKey) || e.affectsConfiguration(ReceivesUpdatesConfigurationKey)) {
if (this.isAutoUpdateEnabled()) {
this.checkForUpdates();
}
}
if (e.affectsConfiguration(RecievesUpdatesConfigurationKey)) {
if (e.affectsConfiguration(ReceivesUpdatesConfigurationKey)) {
this.eventuallySyncWithGallery(true);
}
}, this, this.disposables);
@@ -610,15 +610,15 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService,
}

private isAutoUpdateEnabled(): boolean {
return this.configurationService.getValue(AutoUpdateConfigurationKey);
return this.configurationService.getValue(AutoUpdateConfigurationKey) && this.isReceiveUpdatesEnabled();
}

private isRecieveUpdatesEnabled(): boolean {
return this.configurationService.getValue(RecievesUpdatesConfigurationKey);
private isReceiveUpdatesEnabled(): boolean {
return this.configurationService.getValue(ReceivesUpdatesConfigurationKey);
}

private eventuallySyncWithGallery(immediate = false): void {
if (!this.isRecieveUpdatesEnabled()) {
if (!this.isReceiveUpdatesEnabled()) {
return;
}
const loop = () => this.syncWithGallery().then(() => this.eventuallySyncWithGallery());