Skip to content

Commit 8b981e1

Browse files
committed
1 parent 2fbb91c commit 8b981e1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/vs/platform/userDataSync/common/userDataAutoSyncService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class UserDataAutoSyncService extends UserDataAutoSyncEnablementService i
169169
try {
170170

171171
// Remove machine
172-
if (!donotRemoveMachine) {
172+
if (this.userDataSyncAccountService.account && !donotRemoveMachine) {
173173
await this.userDataSyncMachinesService.removeCurrentMachine();
174174
}
175175

src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,9 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
569569
message: localize('turn off sync confirmation', "Do you want to turn off sync?"),
570570
detail: localize('turn off sync detail', "Your settings, keybindings, extensions and UI State will no longer be synced."),
571571
primaryButton: localize('turn off', "Turn Off"),
572-
checkbox: {
572+
checkbox: this.userDataSyncWorkbenchService.accountStatus === AccountStatus.Available ? {
573573
label: localize('turn off sync everywhere', "Turn off sync on all your devices and clear the data from the cloud.")
574-
}
574+
} : undefined
575575
});
576576
if (result.confirmed) {
577577
return this.userDataSyncWorkbenchService.turnoff(!!result.checkboxChecked);

0 commit comments

Comments
 (0)