mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 19:38:48 +01:00
🎨 Refresh virtual block ref when closing box https://github.com/siyuan-note/siyuan/issues/11149#issuecomment-2106254491
This commit is contained in:
parent
84819beaf7
commit
b959cc2beb
9 changed files with 27 additions and 7 deletions
|
|
@ -31,6 +31,7 @@ import (
|
|||
"github.com/dgraph-io/ristretto"
|
||||
"github.com/siyuan-note/siyuan/kernel/search"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/task"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
)
|
||||
|
||||
|
|
@ -99,6 +100,13 @@ func putBlockVirtualRefKeywords(blockContent string, root *ast.Node) (ret []stri
|
|||
}
|
||||
|
||||
func CacheVirtualBlockRefJob() {
|
||||
if !Conf.Editor.VirtualBlockRef {
|
||||
return
|
||||
}
|
||||
task.AppendTask(task.CacheVirtualBlockRef, ResetVirtualBlockRefCache)
|
||||
}
|
||||
|
||||
func cacheVirtualBlockRef() {
|
||||
virtualBlockRefCache.Del("virtual_ref")
|
||||
if !Conf.Editor.VirtualBlockRef {
|
||||
return
|
||||
|
|
@ -110,7 +118,7 @@ func CacheVirtualBlockRefJob() {
|
|||
|
||||
func ResetVirtualBlockRefCache() {
|
||||
virtualBlockRefCache.Clear()
|
||||
CacheVirtualBlockRefJob()
|
||||
cacheVirtualBlockRef()
|
||||
}
|
||||
|
||||
func AddVirtualBlockRefInclude(keyword []string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue