🎨 Refresh virtual reference cache after doc convert to heading https://github.com/siyuan-note/siyuan/issues/14147

This commit is contained in:
Daniel 2025-02-19 12:11:03 +08:00
parent 674d645077
commit cfbd6852e3
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 12 additions and 0 deletions

View file

@ -268,6 +268,10 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
IncSync()
RefreshBacklink(srcTree.ID)
RefreshBacklink(targetTree.ID)
go func() {
sql.FlushQueue()
ResetVirtualBlockRefCache()
}()
return
}
@ -404,5 +408,9 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath, previousPath string) (sr
IncSync()
RefreshBacklink(srcTree.ID)
RefreshBacklink(newTree.ID)
go func() {
sql.FlushQueue()
ResetVirtualBlockRefCache()
}()
return
}