Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: `完全手动同步` 模式下 Android 前后台切换时不应该触发自动同步 Fix https://github.com/siyuan-note/siyuan/issues/7349

Liang Ding5bac9c4b6dbf
diff --git a/kernel/api/sync.go b/kernel/api/sync.go
index 9a1cbe63d8..37489fd2a1 100644
--- a/kernel/api/sync.go
+++ b/kernel/api/sync.go
@@ -63,10 +63,13 @@ func performSync(c *gin.Context) {
}
// 云端同步模式支持 `完全手动同步` 模式 https://github.com/siyuan-note/siyuan/issues/7295
- upload := true
- if uploadArg := arg["upload"]; nil != uploadArg {
- upload = uploadArg.(bool)
+ uploadArg := arg["upload"]
+ if nil == uploadArg {
+ // 必须传入同步方向,未传的话不执行同步
+ return
}
+
+ upload := uploadArg.(bool)
if upload {
model.SyncDataUpload()
} else {