This commit is contained in:
Sandeep Somavarapu
2020-01-24 12:21:43 +01:00
parent 28bf0b1f56
commit 61141737dd
11 changed files with 283 additions and 212 deletions

View File

@@ -55,12 +55,17 @@ export class SettingsSyncService extends Disposable implements ISettingsSyncServ
return this.channel.call('push');
}
sync(_continue?: boolean): Promise<boolean> {
return this.channel.call('sync', [_continue]);
sync(): Promise<void> {
return this.channel.call('sync');
}
stop(): void {
this.channel.call('stop');
stop(): Promise<void> {
return this.channel.call('stop');
}
async restart(): Promise<void> {
const status = await this.channel.call<SyncStatus>('restart');
await this.updateStatus(status);
}
resetLocal(): Promise<void> {
@@ -79,7 +84,11 @@ export class SettingsSyncService extends Disposable implements ISettingsSyncServ
return this.channel.call('hasLocalData');
}
resolveConflicts(conflicts: { key: string, value: any | undefined }[]): Promise<void> {
resolveConflicts(content: string): Promise<void> {
return this.channel.call('resolveConflicts', [content]);
}
resolveSettingsConflicts(conflicts: { key: string, value: any | undefined }[]): Promise<void> {
return this.channel.call('resolveConflicts', [conflicts]);
}

View File

@@ -46,8 +46,12 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
return this.channel.call('push');
}
sync(_continue?: boolean): Promise<boolean> {
return this.channel.call('sync', [_continue]);
sync(): Promise<void> {
return this.channel.call('sync');
}
resolveConflictsAndContinueSync(content: string): Promise<void> {
return this.channel.call('resolveConflictsAndContinueSync', [content]);
}
reset(): Promise<void> {
@@ -58,8 +62,13 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
return this.channel.call('resetLocal');
}
stop(): void {
this.channel.call('stop');
stop(): Promise<void> {
return this.channel.call('stop');
}
async restart(): Promise<void> {
const status = await this.channel.call<SyncStatus>('restart');
await this.updateStatus(status);
}
hasPreviouslySynced(): Promise<boolean> {