445
const segments = key.split('.');
446
if (segments.length === 3) {
448
>
}
449
}
450
if (!lastSyncProfileKeys.length) {
451
return;
452
}
454
>
const disposables = new DisposableStore();
455
>
456
>
try {
457
>
let defaultProfileSynchronizer = this.activeProfileSynchronizers.get(this.userDataProfilesService.defaultProfile.id)?.[0];
458
if (!defaultProfileSynchronizer) {
459
defaultProfileSynchronizer = disposables.add(this.instantiationService.createInstance(ProfileSynchronizer, this.userDataProfilesService.defaultProfile, undefined));
460
}
461
>
const userDataProfileManifestSynchronizer = defaultProfileSynchronizer.enabled.find(s => s.resource === SyncResource.Profiles) as UserDataProfilesManifestSynchroniser;
userDataSyncService.ts
462
>
if (!userDataProfileManifestSynchronizer) {
463
return;
464
}
465
>
const lastSyncedProfiles = await userDataProfileManifestSynchronizer.getLastSyncedProfiles();
userDataSyncService.ts
466
const lastSyncedCollections = lastSyncedProfiles?.map(p => p.collection) ?? [];
467
for (const [key, collection] of lastSyncProfileKeys) {
469
this.logService.info(`Removing last sync state for stale profile: ${collection}`);
470
this.storageService.remove(key, StorageScope.APPLICATION);
471
}
473
>
} finally {
474
>
disposables.dispose();
475
>
}
476
}
477