mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 06:18:49 +01:00
🎨 Data sync supports the multi-kernel online perception https://github.com/siyuan-note/siyuan/issues/8518
This commit is contained in:
parent
18985de1e5
commit
5e041d9017
4 changed files with 8 additions and 8 deletions
|
|
@ -180,7 +180,7 @@ func syncData(exit, byHand, byWebSocket bool) {
|
|||
now := util.CurrentTimeMillis()
|
||||
Conf.Sync.Synced = now
|
||||
|
||||
err := syncRepo(exit, byHand)
|
||||
mergeResult, err := syncRepo(exit, byHand)
|
||||
code := 1
|
||||
if nil != err {
|
||||
code = 2
|
||||
|
|
@ -192,7 +192,7 @@ func syncData(exit, byHand, byWebSocket bool) {
|
|||
connectSyncWebSocket()
|
||||
}
|
||||
|
||||
if 1 == Conf.Sync.Mode && !byWebSocket && nil != webSocketConn && Conf.Sync.Perception {
|
||||
if 1 == Conf.Sync.Mode && !byWebSocket && nil != webSocketConn && Conf.Sync.Perception && mergeResult.DataChanged() {
|
||||
// 如果处于自动同步模式且不是又 WS 触发的同步,则通知其他设备上的内核进行同步
|
||||
request := map[string]interface{}{
|
||||
"cmd": "synced",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue