This commit is contained in:
Sandeep Somavarapu
2020-02-05 20:21:03 +01:00
parent 96ac038ffb
commit 6fb482dca1
10 changed files with 112 additions and 107 deletions

View File

@@ -84,16 +84,16 @@ export class SettingsSyncService extends Disposable implements ISettingsSyncServ
return this.channel.call('hasLocalData');
}
resolveConflicts(content: string, remote: boolean): Promise<void> {
return this.channel.call('resolveConflicts', [content, remote]);
accept(content: string): Promise<void> {
return this.channel.call('accept', [content]);
}
resolveSettingsConflicts(conflicts: { key: string, value: any | undefined }[]): Promise<void> {
return this.channel.call('resolveConflicts', [conflicts]);
}
getRemoteContent(): Promise<string | null> {
return this.channel.call('getRemoteContent');
getRemoteContent(preview?: boolean): Promise<string | null> {
return this.channel.call('getRemoteContent', [!!preview]);
}
private async updateStatus(status: SyncStatus): Promise<void> {

View File

@@ -49,8 +49,8 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
return this.channel.call('sync');
}
resolveConflictsAndContinueSync(content: string, remote: boolean): Promise<void> {
return this.channel.call('resolveConflictsAndContinueSync', [content, remote]);
accept(source: SyncSource, content: string): Promise<void> {
return this.channel.call('accept', [source, content]);
}
reset(): Promise<void> {
@@ -82,8 +82,8 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
return this.channel.call('hasLocalData');
}
getRemoteContent(source: SyncSource): Promise<string | null> {
return this.channel.call('getRemoteContent', [source]);
getRemoteContent(source: SyncSource, preview: boolean): Promise<string | null> {
return this.channel.call('getRemoteContent', [source, preview]);
}
isFirstTimeSyncAndHasUserData(): Promise<boolean> {