mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 18:54:21 +01:00
This commit is contained in:
parent
525339115a
commit
b804cd2d61
2 changed files with 7 additions and 5 deletions
|
|
@ -61,7 +61,7 @@ func (kValues *KeyValues) GetValue(blockID string) (ret *Value) {
|
|||
|
||||
func (kValues *KeyValues) GetBlockValue() (ret *Value) {
|
||||
for _, v := range kValues.Values {
|
||||
if KeyTypeBlock != v.Type {
|
||||
if KeyTypeBlock == v.Type {
|
||||
ret = v
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,10 +69,12 @@ func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query
|
|||
|
||||
// 批量加载绑定块对应的树
|
||||
var ialIDs []string
|
||||
for _, card := range ret.Cards {
|
||||
block := card.GetBlockValue()
|
||||
if nil != block && !block.IsDetached {
|
||||
ialIDs = append(ialIDs, card.ID)
|
||||
for cardID, keyValues := range cardsValues {
|
||||
for _, kValues := range keyValues {
|
||||
block := kValues.GetBlockValue()
|
||||
if nil != block && !block.IsDetached {
|
||||
ialIDs = append(ialIDs, cardID)
|
||||
}
|
||||
}
|
||||
}
|
||||
boundTrees := filesys.LoadTrees(ialIDs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue