mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🐛 文档转换标题后文档树刷新不正确 https://github.com/siyuan-note/siyuan/issues/7435
This commit is contained in:
parent
c65a88db88
commit
685d47452d
2 changed files with 7 additions and 4 deletions
|
|
@ -224,6 +224,13 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||
contentPivot.Unlink()
|
||||
}
|
||||
|
||||
// 推送给前端移除旧文档
|
||||
evt := util.NewCmdResult("removeDoc", 0, util.PushModeBroadcast)
|
||||
evt.Data = map[string]interface{}{
|
||||
"ids": []string{srcTree.Root.ID},
|
||||
}
|
||||
util.PushEvent(evt)
|
||||
|
||||
srcTreeBox, srcTreePath = srcTree.Box, srcTree.Path // 返回旧的文档块位置,前端后续会删除旧的文档块
|
||||
targetTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
||||
err = indexWriteJSONQueue(targetTree)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue