mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
🎨 Improve reference count update after document convert to heading https://github.com/siyuan-note/siyuan/issues/15299
This commit is contained in:
parent
ef0a278334
commit
62d560e7a8
8 changed files with 28 additions and 57 deletions
|
|
@ -1599,13 +1599,7 @@ func removeDoc0(tree *parse.Tree, childrenDir string) {
|
|||
refDefIDs := getRefDefIDs(tree.Root)
|
||||
// 推送定义节点引用计数
|
||||
for _, defID := range refDefIDs {
|
||||
defTree, _ := LoadTreeByBlockID(defID)
|
||||
if nil != defTree {
|
||||
defNode := treenode.GetNodeInTree(defTree, defID)
|
||||
if nil != defNode {
|
||||
task.AppendAsyncTaskWithDelay(task.SetDefRefCount, util.SQLFlushInterval, refreshRefCount, defTree.ID, defNode.ID)
|
||||
}
|
||||
}
|
||||
task.AppendAsyncTaskWithDelay(task.SetDefRefCount, util.SQLFlushInterval, refreshRefCount, defID)
|
||||
}
|
||||
|
||||
treenode.RemoveBlockTreesByPathPrefix(childrenDir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue