mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/14511
This commit is contained in:
parent
0deda92cac
commit
a0e98ea35d
2 changed files with 11 additions and 11 deletions
|
|
@ -565,17 +565,19 @@ func (av *AttributeView) GetCurrentView(viewID string) (ret *View, err error) {
|
|||
}
|
||||
|
||||
func (av *AttributeView) ExistBlock(blockID string) bool {
|
||||
for _, kv := range av.KeyValues {
|
||||
if KeyTypeBlock != kv.Key.Type {
|
||||
continue
|
||||
for _, blockVal := range av.GetBlockKeyValues().Values {
|
||||
if blockVal.BlockID == blockID {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
for _, v := range kv.Values {
|
||||
if v.BlockID == blockID {
|
||||
return true
|
||||
}
|
||||
func (av *AttributeView) ExistBoundBlock(nodeID string) bool {
|
||||
for _, blockVal := range av.GetBlockKeyValues().Values {
|
||||
if blockVal.Block.ID == nodeID {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue