mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
♻️ Refactor av data structure
This commit is contained in:
parent
f123a9a210
commit
870c238ed6
2 changed files with 6 additions and 4 deletions
|
|
@ -694,12 +694,13 @@ func updateAttributeViewCell(operation *Operation, tx *Transaction) (err error)
|
|||
for _, value := range keyValues.Values {
|
||||
if operation.ID == value.ID {
|
||||
val = value
|
||||
val.Type = keyValues.Key.Type
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if nil == val {
|
||||
val = &av.Value{ID: operation.ID, KeyID: keyValues.Key.ID, BlockID: operation.RowID}
|
||||
val = &av.Value{ID: operation.ID, KeyID: keyValues.Key.ID, BlockID: operation.RowID, Type: keyValues.Key.Type}
|
||||
keyValues.Values = append(keyValues.Values, val)
|
||||
}
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue