Skip to content

Commit 33bf1b2

Browse files
committed
1 parent 37c72e7 commit 33bf1b2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export class SettingsEditor2 extends BaseEditor {
169169
@IKeybindingService private readonly keybindingService: IKeybindingService,
170170
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
171171
@IProductService private readonly productService: IProductService,
172+
@IUserDataSyncEnablementService private readonly userDataSyncEnablementService: IUserDataSyncEnablementService
172173
) {
173174
super(SettingsEditor2.ID, telemetryService, themeService, storageService);
174175
this.delayedFilterLogging = new Delayer<void>(1000);
@@ -468,7 +469,7 @@ export class SettingsEditor2 extends BaseEditor {
468469
this.settingsTargetsWidget.settingsTarget = ConfigurationTarget.USER_LOCAL;
469470
this.settingsTargetsWidget.onDidTargetChange(target => this.onDidSettingsTargetChange(target));
470471

471-
if (syncAllowed(this.productService, this.configurationService)) {
472+
if (syncAllowed(this.productService, this.configurationService) && this.userDataSyncEnablementService.canToggleEnablement()) {
472473
const syncControls = this._register(this.instantiationService.createInstance(SyncControls, headerControlsContainer));
473474
this._register(syncControls.onDidChangeLastSyncedLabel(lastSyncedLabel => this.updateInputAriaLabel(lastSyncedLabel)));
474475
}

0 commit comments

Comments
 (0)