mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 00:20:11 +08:00
⚡ Refactor the blocktree storage https://github.com/siyuan-note/siyuan/issues/11773
This commit is contained in:
parent
42d27a82a1
commit
d65ef3cd7c
@ -49,10 +49,9 @@ func GetMirrorAttrViewBlockIDs(avID string) (ret []string) {
|
||||
}
|
||||
|
||||
blockIDs := avBlocks[avID]
|
||||
for _, blockID := range blockIDs {
|
||||
if nil != GetBlockTree(blockID) {
|
||||
ret = append(ret, blockID)
|
||||
}
|
||||
bts := GetBlockTrees(blockIDs)
|
||||
for blockID := range bts {
|
||||
ret = append(ret, blockID)
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -87,11 +86,8 @@ func BatchGetMirrorAttrViewBlocks(avIDs []string) (ret []*AvBlock) {
|
||||
|
||||
for _, avID := range avIDs {
|
||||
var blockIDs []string
|
||||
for _, blockID := range avBlocks[avID] {
|
||||
if nil == GetBlockTree(blockID) {
|
||||
continue
|
||||
}
|
||||
|
||||
bts := GetBlockTrees(avBlocks[avID])
|
||||
for blockID := range bts {
|
||||
blockIDs = append(blockIDs, blockID)
|
||||
}
|
||||
avBlock := &AvBlock{
|
||||
|
Loading…
Reference in New Issue
Block a user