control selecting settings service through canSwitch property

This commit is contained in:
Sandeep Somavarapu
2020-09-16 12:01:12 +02:00
parent f3bf1d1778
commit 67bd821c07
8 changed files with 27 additions and 16 deletions

View File

@@ -446,8 +446,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
async switchSyncService(type: UserDataSyncStoreType): Promise<void> {
if (!this.userDataSyncStoreManagementService.userDataSyncStore
|| !this.userDataSyncStoreManagementService.userDataSyncStore.insidersUrl
|| !this.userDataSyncStoreManagementService.userDataSyncStore.stableUrl) {
|| !this.userDataSyncStoreManagementService.userDataSyncStore.canSwitch) {
return;
}
await this.userDataSyncStoreManagementService.switch(type);

View File

@@ -42,6 +42,7 @@ class UserDataSyncStoreManagementService extends AbstractUserDataSyncStoreManage
defaultUrl: URI.revive(userDataSyncStore.defaultUrl),
insidersUrl: URI.revive(userDataSyncStore.insidersUrl),
stableUrl: URI.revive(userDataSyncStore.stableUrl),
canSwitch: userDataSyncStore.canSwitch,
authenticationProviders: userDataSyncStore.authenticationProviders,
};
}