refactor: update syncWikiIfNeeded to use syncOrForcePull

This commit is contained in:
linonetwo 2023-12-31 18:38:05 +08:00
parent 87957c3581
commit 8bf3fcdc1d
6 changed files with 68 additions and 37 deletions

View file

@ -140,6 +140,7 @@ export class WorkspaceView implements IWorkspaceViewService {
});
} else {
// sync in non-blocking way
// TODO: use syncWikiIfNeeded
void this.gitService.commitAndSync(workspace, { remoteUrl: githubRepoUrl, userInfo }).then(async (hasChanges) => {
if (hasChanges) {
await this.workspaceViewService.restartWorkspaceViewService(workspace.id);