mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791
This commit is contained in:
parent
c6e06b9f21
commit
34fa102296
5 changed files with 83 additions and 40 deletions
|
|
@ -128,7 +128,7 @@ func refreshProtyle(rootID string) {
|
|||
}
|
||||
|
||||
// 刷新关联的嵌入块
|
||||
refIDs, _ := sql.QueryRefIDsByDefID(rootID, true)
|
||||
refIDs := sql.QueryRefIDsByDefID(rootID, true)
|
||||
var rootIDs []string
|
||||
bts := treenode.GetBlockTrees(refIDs)
|
||||
for _, bt := range bts {
|
||||
|
|
@ -154,11 +154,11 @@ func refreshRefCount(rootID, blockID string) {
|
|||
isDoc := bt.ID == bt.RootID
|
||||
var rootRefIDs []string
|
||||
var refCount, rootRefCount int
|
||||
refIDs, _ := sql.QueryRefIDsByDefID(bt.ID, isDoc)
|
||||
refIDs := sql.QueryRefIDsByDefID(bt.ID, isDoc)
|
||||
if isDoc {
|
||||
rootRefIDs = refIDs
|
||||
} else {
|
||||
rootRefIDs, _ = sql.QueryRefIDsByDefID(bt.RootID, true)
|
||||
rootRefIDs = sql.QueryRefIDsByDefID(bt.RootID, true)
|
||||
}
|
||||
refCount = len(refIDs)
|
||||
rootRefCount = len(rootRefIDs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue