🎨 Improve database block remove https://github.com/siyuan-note/siyuan/issues/11731
This commit is contained in:
parent
b590091c9e
commit
e99852f067
1 changed files with 9 additions and 0 deletions
|
@ -1640,6 +1640,15 @@ func removeDoc(box *Box, p string, luteEngine *lute.Lute) {
|
|||
}
|
||||
indexHistoryDir(filepath.Base(historyDir), util.NewLute())
|
||||
|
||||
// 刷新文档关联的数据库 https://github.com/siyuan-note/siyuan/issues/11731
|
||||
allRemoveRootIDs := []string{tree.ID}
|
||||
allRemoveRootIDs = append(allRemoveRootIDs, removeIDs...)
|
||||
for _, rootID := range allRemoveRootIDs {
|
||||
if removeTree, _ := LoadTreeByBlockID(rootID); nil != removeTree {
|
||||
syncDelete2AttributeView(removeTree.Root)
|
||||
}
|
||||
}
|
||||
|
||||
if existChildren {
|
||||
if err = box.Remove(childrenDir); nil != err {
|
||||
logging.LogErrorf("remove children dir [%s%s] failed: %s", box.ID, childrenDir, err)
|
||||
|
|
Loading…
Add table
Reference in a new issue