mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-30 04:05:16 +01:00
🐛 文档转换标题后文档树刷新不正确 https://github.com/siyuan-note/siyuan/issues/7435
This commit is contained in:
parent
2994a9b1d7
commit
6c0f976ed2
1 changed files with 3 additions and 0 deletions
|
|
@ -238,6 +238,8 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||
|
||||
srcTreeBox, srcTreePath = srcTree.Box, srcTree.Path // 返回旧的文档块位置,前端后续会删除旧的文档块
|
||||
targetTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
||||
treenode.RemoveBlockTreesByRootID(srcTree.ID)
|
||||
treenode.RemoveBlockTreesByRootID(targetTree.ID)
|
||||
err = indexWriteJSONQueue(targetTree)
|
||||
IncSync()
|
||||
RefreshBacklink(srcTree.ID)
|
||||
|
|
@ -331,6 +333,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
|
|||
if nil == srcTree.Root.FirstChild {
|
||||
srcTree.Root.AppendChild(treenode.NewParagraph())
|
||||
}
|
||||
treenode.RemoveBlockTreesByRootID(srcTree.ID)
|
||||
if err = indexWriteJSONQueue(srcTree); nil != err {
|
||||
return "", "", err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue