This commit is contained in:
Daniel 2025-08-06 09:51:30 +08:00
parent 6c0eed5d09
commit 34647490f2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -303,13 +303,13 @@ func hideAttributeViewGroup(avID, blockID, groupID string, hidden int) (err erro
} }
func (tx *Transaction) doHideAttrViewAllGroups(operation *Operation) (ret *TxErr) { func (tx *Transaction) doHideAttrViewAllGroups(operation *Operation) (ret *TxErr) {
if err := hideAttributeViewAllGroups(operation.AvID, operation.BlockID, int(operation.Data.(float64))); nil != err { if err := hideAttributeViewAllGroups(operation.AvID, operation.BlockID, operation.Data.(bool)); nil != err {
return &TxErr{code: TxErrHandleAttributeView, id: operation.AvID, msg: err.Error()} return &TxErr{code: TxErrHandleAttributeView, id: operation.AvID, msg: err.Error()}
} }
return return
} }
func hideAttributeViewAllGroups(avID, blockID string, hidden int) (err error) { func hideAttributeViewAllGroups(avID, blockID string, hidden bool) (err error) {
attrView, err := av.ParseAttributeView(avID) attrView, err := av.ParseAttributeView(avID)
if err != nil { if err != nil {
return return
@ -321,7 +321,12 @@ func hideAttributeViewAllGroups(avID, blockID string, hidden int) (err error) {
} }
for _, group := range view.Groups { for _, group := range view.Groups {
group.GroupHidden = hidden if hidden {
group.GroupHidden = 2
} else {
group.GroupHidden = 0
}
break break
} }