🎨 The database primary key field displays the icon of the bound doc https://github.com/siyuan-note/siyuan/issues/13378

This commit is contained in:
Daniel 2024-12-09 11:55:29 +08:00
parent dbdf3c15a9
commit 807f0df86f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 16 additions and 12 deletions

View file

@ -269,7 +269,11 @@ func refreshDynamicRefTexts(updatedDefNodes map[string]*ast.Node, updatedTrees m
for _, blockValue := range blockValues.Values {
if blockValue.Block.ID == updatedDefNode.ID {
newContent := getNodeAvBlockText(updatedDefNode)
newIcon, newContent := getNodeAvBlockText(updatedDefNode)
if newIcon != blockValue.Block.Icon {
blockValue.Block.Icon = newIcon
changedAv = true
}
if newContent != blockValue.Block.Content {
blockValue.Block.Content = newContent
changedAv = true