mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
fix switching to insiders when settings sync is disabled
This commit is contained in:
parent
d9cc12292d
commit
c35100aba3
|
@ -529,7 +529,9 @@ export class SwitchProductQualityContribution extends Disposable implements IWor
|
|||
const storageService = accessor.get(IStorageService);
|
||||
const userDataSyncWorkbenchService = accessor.get(IUserDataSyncWorkbenchService);
|
||||
const userDataSyncService = accessor.get(IUserDataSyncService);
|
||||
const notificationService = accessor.get(INotificationService);
|
||||
|
||||
try {
|
||||
const selectSettingsSyncServiceDialogShownKey = 'switchQuality.selectSettingsSyncServiceDialogShown';
|
||||
const userDataSyncStore = userDataSyncStoreManagementService.userDataSyncStore;
|
||||
let userDataSyncStoreType: UserDataSyncStoreType | undefined;
|
||||
|
@ -563,8 +565,8 @@ export class SwitchProductQualityContribution extends Disposable implements IWor
|
|||
promises.push(Event.toPromise(Event.filter(userDataSyncService.onDidChangeStatus, status => status !== SyncStatus.Syncing)));
|
||||
}
|
||||
|
||||
// Synchronise the store type option in insiders service, so that other clients using insiders service are also updated.
|
||||
if (isSwitchingToInsiders) {
|
||||
// If user chose the sync service then synchronise the store type option in insiders service, so that other clients using insiders service are also updated.
|
||||
if (isSwitchingToInsiders && userDataSyncStoreType) {
|
||||
promises.push(userDataSyncWorkbenchService.synchroniseUserDataSyncStoreType());
|
||||
}
|
||||
|
||||
|
@ -577,6 +579,9 @@ export class SwitchProductQualityContribution extends Disposable implements IWor
|
|||
storageService.remove(selectSettingsSyncServiceDialogShownKey, StorageScope.GLOBAL);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
notificationService.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
private async selectSettingsSyncService(dialogService: IDialogService): Promise<UserDataSyncStoreType | undefined> {
|
||||
|
|
Loading…
Reference in a new issue