mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +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
6eaaf77a41
commit
310c9b844c
3 changed files with 6 additions and 5 deletions
|
|
@ -154,8 +154,9 @@ func refreshRefCount(rootID, blockID string) {
|
|||
isDoc := bt.ID == bt.RootID
|
||||
var rootRefIDs []string
|
||||
var refCount, rootRefCount int
|
||||
refIDs := sql.QueryRefIDsByDefID(bt.ID, isDoc)
|
||||
var refIDs []string
|
||||
if isDoc {
|
||||
refIDs = sql.QueryRefIDsByDefID(bt.ID, isDoc)
|
||||
rootRefIDs = refIDs
|
||||
} else {
|
||||
rootRefIDs = sql.QueryRefIDsByDefID(bt.RootID, true)
|
||||
|
|
@ -169,7 +170,7 @@ func refreshRefCount(rootID, blockID string) {
|
|||
defIDs = append(defIDs, bt.ID)
|
||||
}
|
||||
|
||||
util.PushSetDefRefCount(rootID, blockID, refIDs, rootRefIDs, defIDs, refCount, rootRefCount)
|
||||
util.PushSetDefRefCount(rootID, blockID, defIDs, refCount, rootRefCount)
|
||||
}
|
||||
|
||||
// refreshDynamicRefText 用于刷新块引用的动态锚文本。
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue