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