remove preview dialog

This commit is contained in:
Sandeep Somavarapu 2021-07-27 14:42:42 +02:00
parent dbd291c716
commit 40b8585b4f
No known key found for this signature in database
GPG key ID: 1FED25EC4646638B

View file

@ -460,11 +460,6 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
if (!this.userDataSyncWorkbenchService.authenticationProviders.length) {
throw new Error(localize('no authentication providers', "No authentication providers are available."));
}
if (!this.storageService.getBoolean('sync.donotAskPreviewConfirmation', StorageScope.GLOBAL, false)) {
if (!await this.askForConfirmation()) {
return;
}
}
const turnOn = await this.askToConfigure();
if (!turnOn) {
return;
@ -519,26 +514,6 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
}
}
private async askForConfirmation(): Promise<boolean> {
const result = await this.dialogService.show(
Severity.Info,
localize('sync preview message', "Synchronizing your settings is a preview feature, please read the documentation before turning it on."),
[
localize('turn on', "Turn On"),
localize('open doc', "Open Documentation"),
localize('cancel', "Cancel"),
],
{
cancelId: 2
}
);
switch (result.choice) {
case 1: this.openerService.open(URI.parse('https://aka.ms/vscode-settings-sync-help')); return false;
case 2: return false;
}
return true;
}
private async askToConfigure(): Promise<boolean> {
return new Promise<boolean>((c, e) => {
const disposables: DisposableStore = new DisposableStore();