File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/preferences/browser Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments