🎨 Improve database attribute panel number field formating https://github.com/siyuan-note/siyuan/issues/12491

This commit is contained in:
Daniel 2024-09-16 16:53:21 +08:00
parent 74d3302b09
commit 1e8133e9e5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 12 additions and 5 deletions

View file

@ -2978,11 +2978,11 @@ func (tx *Transaction) doUpdateAttrViewCell(operation *Operation) (ret *TxErr) {
}
func updateAttributeViewCell(operation *Operation, tx *Transaction) (err error) {
err = UpdateAttributeViewCell(tx, operation.AvID, operation.KeyID, operation.RowID, operation.ID, operation.Data)
_, err = UpdateAttributeViewCell(tx, operation.AvID, operation.KeyID, operation.RowID, operation.ID, operation.Data)
return
}
func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string, valueData interface{}) (err error) {
func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string, valueData interface{}) (val *av.Value, err error) {
attrView, err := av.ParseAttributeView(avID)
if err != nil {
return
@ -3002,7 +3002,6 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
}
now := time.Now().UnixMilli()
var val *av.Value
oldIsDetached := true
if nil != blockVal {
oldIsDetached = blockVal.IsDetached