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

@ -131,6 +131,7 @@ export async function getWorkspaceMenuTemplate(
enabled: isOnline,
click: async () => {
if (isSubWiki) {
// TODO: use syncWikiIfNeeded
const hasChanges = await service.git.commitAndSync(workspace, { remoteUrl: gitUrl, userInfo });
if (hasChanges) {
if (mainWikiID === null) {