From bb0bbaf5a0c09d537726fabe496f8e0bfa1c8c5e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 24 Jun 2023 17:48:57 +0800 Subject: [PATCH] :art: After invoking kernel API `setBlockAttrs` then auto refresh dynamic anchor text of block refs Fix https://github.com/siyuan-note/siyuan/issues/8605 --- kernel/model/blockial.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/model/blockial.go b/kernel/model/blockial.go index 63e3c7e15..64575b010 100644 --- a/kernel/model/blockial.go +++ b/kernel/model/blockial.go @@ -138,7 +138,9 @@ func setNodeAttrs(node *ast.Node, tree *parse.Tree, nameValues map[string]string pushBroadcastAttrTransactions(oldAttrs, node) go func() { - sql.WaitForWritingDatabase() + if !sql.IsEmptyQueue() { + sql.WaitForWritingDatabase() + } refreshDynamicRefText(node, tree) }() return