mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 09:38:26 -05:00
Merge from vscode 8c426f9f3b6b18935cc6c2ec8aa6d45ccd88021e
This commit is contained in:
@@ -32,6 +32,7 @@ type AutoSyncErrorClassification = {
|
||||
const enablementKey = 'sync.enable';
|
||||
const disableMachineEventuallyKey = 'sync.disableMachineEventually';
|
||||
const sessionIdKey = 'sync.sessionId';
|
||||
const storeUrlKey = 'sync.storeUrl';
|
||||
|
||||
export class UserDataAutoSyncEnablementService extends Disposable {
|
||||
|
||||
@@ -97,15 +98,20 @@ export class UserDataAutoSyncService extends UserDataAutoSyncEnablementService i
|
||||
this.syncTriggerDelayer = this._register(new Delayer<void>(0));
|
||||
|
||||
if (userDataSyncStoreService.userDataSyncStore) {
|
||||
|
||||
storageService.store(storeUrlKey, userDataSyncStoreService.userDataSyncStore.url.toString(), StorageScope.GLOBAL);
|
||||
|
||||
if (this.isEnabled()) {
|
||||
this.logService.info('Auto Sync is enabled.');
|
||||
} else {
|
||||
this.logService.info('Auto Sync is disabled.');
|
||||
}
|
||||
this.updateAutoSync();
|
||||
|
||||
if (this.hasToDisableMachineEventually()) {
|
||||
this.disableMachineEventually();
|
||||
}
|
||||
|
||||
this._register(userDataSyncAccountService.onDidChangeAccount(() => this.updateAutoSync()));
|
||||
this._register(userDataSyncStoreService.onDidChangeDonotMakeRequestsUntil(() => this.updateAutoSync()));
|
||||
this._register(Event.debounce<string, string[]>(userDataSyncService.onDidChangeLocal, (last, source) => last ? [...last, source] : [source], 1000)(sources => this.triggerSync(sources, false)));
|
||||
|
||||
Reference in New Issue
Block a user