Skip to content

Commit

Permalink
🐛 文档转换标题后文档树刷新不正确 #7435
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Feb 22, 2023
1 parent 2994a9b commit 6c0f976
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/model/heading.go
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 6c0f976

Please sign in to comment.