This commit is contained in:
Sandeep Somavarapu
2020-07-21 13:54:34 +02:00
parent eb1ca267d6
commit b8405ce0b8
13 changed files with 59 additions and 30 deletions

View File

@@ -593,7 +593,7 @@ class UserDataSyncPreview extends Disposable implements IUserDataSyncPreview {
this.updateResources();
}
async accept(syncResource: SyncResource, resource: URI, content: string): Promise<void> {
async accept(syncResource: SyncResource, resource: URI, content: string | null): Promise<void> {
if (this.manualSync) {
const syncPreview = await this.manualSync.task.accept(resource, content);
this.updatePreview(syncPreview);

View File

@@ -20,7 +20,7 @@ export interface IUserDataSyncPreview {
readonly onDidChangeResources: Event<ReadonlyArray<IUserDataSyncResource>>;
readonly resources: ReadonlyArray<IUserDataSyncResource>;
accept(syncResource: SyncResource, resource: URI, content: string): Promise<void>;
accept(syncResource: SyncResource, resource: URI, content: string | null): Promise<void>;
merge(resource?: URI): Promise<void>;
discard(resource?: URI): Promise<void>;
pull(): Promise<void>;

View File

@@ -102,7 +102,7 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
return this.channel.call('hasLocalData');
}
accept(syncResource: SyncResource, resource: URI, content: string, apply: boolean): Promise<void> {
accept(syncResource: SyncResource, resource: URI, content: string | null, apply: boolean): Promise<void> {
return this.channel.call('accept', [syncResource, resource, content, apply]);
}
@@ -186,7 +186,7 @@ class ManualSyncTask implements IManualSyncTask {
return this.deserializePreviews(previews);
}
async accept(resource: URI, content: string): Promise<[SyncResource, ISyncResourcePreview][]> {
async accept(resource: URI, content: string | null): Promise<[SyncResource, ISyncResourcePreview][]> {
const previews = await this.channel.call<[SyncResource, ISyncResourcePreview][]>('accept', [resource, content]);
return this.deserializePreviews(previews);
}