mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 19:10:49 +08:00
🎨 Improve dynamic anchor text and ref count auto-refresh stability https://github.com/siyuan-note/siyuan/issues/8234
This commit is contained in:
parent
68c1fc8928
commit
43867e0855
@ -1250,7 +1250,8 @@ func pushSetDefRefCount(rootID, blockID string) {
|
|||||||
for _, count := range refCounts {
|
for _, count := range refCounts {
|
||||||
rootRefCount += count
|
rootRefCount += count
|
||||||
}
|
}
|
||||||
util.PushSetDefRefCount(rootID, blockID, refCount, rootRefCount)
|
refIDs, _, _ := GetBlockRefIDs(blockID)
|
||||||
|
util.PushSetDefRefCount(rootID, blockID, refIDs, refCount, rootRefCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
func upsertAvBlockRel(node *ast.Node) {
|
func upsertAvBlockRel(node *ast.Node) {
|
||||||
|
@ -262,8 +262,8 @@ func PushSetRefDynamicText(rootID, blockID, defBlockID, refText string) {
|
|||||||
BroadcastByType("main", "setRefDynamicText", 0, "", map[string]interface{}{"rootID": rootID, "blockID": blockID, "defBlockID": defBlockID, "refText": refText})
|
BroadcastByType("main", "setRefDynamicText", 0, "", map[string]interface{}{"rootID": rootID, "blockID": blockID, "defBlockID": defBlockID, "refText": refText})
|
||||||
}
|
}
|
||||||
|
|
||||||
func PushSetDefRefCount(rootID, blockID string, refCount, rootRefCount int) {
|
func PushSetDefRefCount(rootID, blockID string, refIDs []string, refCount, rootRefCount int) {
|
||||||
BroadcastByType("main", "setDefRefCount", 0, "", map[string]interface{}{"rootID": rootID, "blockID": blockID, "refCount": refCount, "rootRefCount": rootRefCount})
|
BroadcastByType("main", "setDefRefCount", 0, "", map[string]interface{}{"rootID": rootID, "blockID": blockID, "refCount": refCount, "rootRefCount": rootRefCount, "refIDs": refIDs})
|
||||||
}
|
}
|
||||||
|
|
||||||
func PushProtyleLoading(rootID, msg string) {
|
func PushProtyleLoading(rootID, msg string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user