mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 Improve dynamic anchor text auto-refresh stability https://github.com/siyuan-note/siyuan/issues/8234
This commit is contained in:
parent
ca17aee797
commit
1ff69fa257
2 changed files with 4 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ import (
|
||||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
"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/treenode"
|
||||||
"github.com/siyuan-note/siyuan/kernel/util"
|
"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
|
||||||
}
|
}
|
||||||
return ast.WalkContinue
|
return ast.WalkContinue
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ const (
|
||||||
AssetContentDatabaseIndexCommit = "task.asset.database.index.commit" // 资源文件数据库索引提交
|
AssetContentDatabaseIndexCommit = "task.asset.database.index.commit" // 资源文件数据库索引提交
|
||||||
CacheVirtualBlockRef = "task.cache.virtualBlockRef" // 缓存虚拟块引用
|
CacheVirtualBlockRef = "task.cache.virtualBlockRef" // 缓存虚拟块引用
|
||||||
ReloadAttributeView = "task.reload.attributeView" // 重新加载属性视图
|
ReloadAttributeView = "task.reload.attributeView" // 重新加载属性视图
|
||||||
|
ReloadProtyleBlock = "task.reload.protyleBlock" // 重载编辑器内容块
|
||||||
PushMsg = "task.push.msg" // 推送消息
|
PushMsg = "task.push.msg" // 推送消息
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -149,6 +150,7 @@ var uniqueActions = []string{
|
||||||
AssetContentDatabaseIndexFull,
|
AssetContentDatabaseIndexFull,
|
||||||
AssetContentDatabaseIndexCommit,
|
AssetContentDatabaseIndexCommit,
|
||||||
ReloadAttributeView,
|
ReloadAttributeView,
|
||||||
|
ReloadProtyleBlock,
|
||||||
}
|
}
|
||||||
|
|
||||||
func ContainIndexTask() bool {
|
func ContainIndexTask() bool {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue