🎨 Improve dynamic anchor text auto-refresh stability https://github.com/siyuan-note/siyuan/issues/8234

This commit is contained in:
Daniel 2024-09-06 00:07:57 +08:00
parent ca17aee797
commit 1ff69fa257
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 4 additions and 1 deletions

View file

@ -40,6 +40,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/sql"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
)
@ -1488,7 +1489,7 @@ func refreshDynamicRefTexts(updatedDefNodes map[string]*ast.Node, updatedTrees m
}
// 推送动态锚文本节点刷新
util.PushReloadBlock(refTreeID, n.ID)
task.AppendAsyncTaskWithDelay(task.ReloadProtyleBlock, 200*time.Millisecond, util.PushReloadBlock, refTreeID, n.ID)
return ast.WalkContinue
}
return ast.WalkContinue