mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Refresh the data in the interface after moving the document https://github.com/siyuan-note/siyuan/issues/15762
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
d5e7b27a11
commit
ee4ddf89c1
6 changed files with 39 additions and 23 deletions
|
|
@ -305,3 +305,16 @@ func indexTreeInFilesystem(rootID string) {
|
|||
sql.IndexTreeQueue(tree)
|
||||
logging.LogInfof("reindexed tree by filesystem [rootID=%s]", rootID)
|
||||
}
|
||||
|
||||
func loadParentTree(tree *parse.Tree) (ret *parse.Tree) {
|
||||
boxDir := filepath.Join(util.DataDir, tree.Box)
|
||||
parentDir := path.Dir(tree.Path)
|
||||
if parentDir == boxDir || parentDir == "/" {
|
||||
return
|
||||
}
|
||||
|
||||
luteEngine := lute.New()
|
||||
parentPath := parentDir + ".sy"
|
||||
ret, _ = filesys.LoadTree(tree.Box, parentPath, luteEngine)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue