mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)
This commit is contained in:
@@ -11,7 +11,7 @@ import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiatio
|
||||
|
||||
export class UpdateService implements IUpdateService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
|
||||
private _onStateChange = new Emitter<State>();
|
||||
readonly onStateChange: Event<State> = this._onStateChange.event;
|
||||
|
||||
@@ -81,8 +81,15 @@ export abstract class AbstractUpdateService implements IUpdateService {
|
||||
return;
|
||||
}
|
||||
|
||||
// Start checking for updates after 30 seconds
|
||||
this.scheduleCheckForUpdates(30 * 1000).then(undefined, err => this.logService.error(err));
|
||||
if (updateMode === 'start') {
|
||||
this.logService.info('update#ctor - startup checks only; automatic updates are disabled by user preference');
|
||||
|
||||
// Check for updates only once after 30 seconds
|
||||
setTimeout(() => this.checkForUpdates(null), 30 * 1000);
|
||||
} else {
|
||||
// Start checking for updates after 30 seconds
|
||||
this.scheduleCheckForUpdates(30 * 1000).then(undefined, err => this.logService.error(err));
|
||||
}
|
||||
}
|
||||
|
||||
private getProductQuality(updateMode: string): string | undefined {
|
||||
|
||||
@@ -17,7 +17,7 @@ configurationRegistry.registerConfiguration({
|
||||
properties: {
|
||||
'update.mode': {
|
||||
type: 'string',
|
||||
enum: ['none', 'manual', 'default'],
|
||||
enum: ['none', 'manual', 'start', 'default'],
|
||||
default: 'default',
|
||||
scope: ConfigurationScope.APPLICATION,
|
||||
description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."),
|
||||
@@ -25,6 +25,7 @@ configurationRegistry.registerConfiguration({
|
||||
enumDescriptions: [
|
||||
localize('none', "Disable updates."),
|
||||
localize('manual', "Disable automatic background update checks. Updates will be available if you manually check for updates."),
|
||||
localize('start', "Check for updates only on startup. Disable automatic background update checks."),
|
||||
localize('default', "Enable automatic update checks. Code will check for updates automatically and periodically.")
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user