diff --git a/src/vs/platform/actions/common/offlineMode.ts b/src/vs/platform/actions/common/offlineMode.ts index b3d3e6ba07d80..cb7371f1b3813 100644 --- a/src/vs/platform/actions/common/offlineMode.ts +++ b/src/vs/platform/actions/common/offlineMode.ts @@ -71,7 +71,7 @@ export class NotifyUnsupportedFeatureInOfflineMode extends Action { @IConfigurationService private configurationService: IConfigurationService, @INotificationService private notificationService: INotificationService ) { - super(id); + super(id, label); } run(): TPromise { diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index a6fdceb17271c..c63ef70b328ab 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -30,7 +30,7 @@ import { IWindowService } from 'vs/platform/windows/common/windows'; import { ReleaseNotesManager } from './releaseNotesEditor'; import { isWindows } from 'vs/base/common/platform'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { offlineModeSetting } from 'vs/platform/actions/common/offlineMode'; +import { offlineModeSetting, NotifyUnsupportedFeatureInOfflineMode } from 'vs/platform/actions/common/offlineMode'; let releaseNotesManager: ReleaseNotesManager | undefined = undefined; @@ -322,7 +322,8 @@ export class UpdateContribution implements IGlobalActivity { @IDialogService private dialogService: IDialogService, @IUpdateService private updateService: IUpdateService, @IActivityService private activityService: IActivityService, - @IWindowService private windowService: IWindowService + @IWindowService private windowService: IWindowService, + @IConfigurationService private configurationService: IConfigurationService ) { this.state = updateService.state; @@ -546,6 +547,15 @@ export class UpdateContribution implements IGlobalActivity { } private getUpdateAction(): IAction | null { + if (this.configurationService.getValue(offlineModeSetting) === true) { + return new NotifyUnsupportedFeatureInOfflineMode( + NotifyUnsupportedFeatureInOfflineMode.ID, + nls.localize('checkForUpdates', "Check for Updates..."), + this.configurationService, + this.notificationService + ); + } + const state = this.updateService.state; switch (state.type) {