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

This commit is contained in:
Liang Ding 2023-02-12 15:42:54 +08:00
parent 99993ab820
commit 5bac9c4b6d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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 {