mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Support hiding database table view title https://github.com/siyuan-note/siyuan/issues/10478
This commit is contained in:
parent
ec46cbfce7
commit
7dcdcfb0d3
3 changed files with 33 additions and 3 deletions
|
|
@ -1017,6 +1017,33 @@ func getRowBlockValue(keyValues []*av.KeyValues) (ret *av.Value) {
|
|||
return
|
||||
}
|
||||
|
||||
func (tx *Transaction) doHideAttrViewName(operation *Operation) (ret *TxErr) {
|
||||
err := hideAttrViewName(operation)
|
||||
if nil != err {
|
||||
return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: err.Error()}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func hideAttrViewName(operation *Operation) (err error) {
|
||||
attrView, err := av.ParseAttributeView(operation.AvID)
|
||||
if nil != err {
|
||||
logging.LogErrorf("parse attribute view [%s] failed: %s", operation.AvID, err)
|
||||
return
|
||||
}
|
||||
|
||||
viewID := operation.ID
|
||||
view := attrView.GetView(viewID)
|
||||
if nil == view {
|
||||
logging.LogErrorf("get view [%s] failed: %s", viewID, err)
|
||||
return
|
||||
}
|
||||
|
||||
view.HideAttrViewName = operation.Data.(bool)
|
||||
err = av.SaveAttributeView(attrView)
|
||||
return
|
||||
}
|
||||
|
||||
func (tx *Transaction) doUpdateAttrViewColRollup(operation *Operation) (ret *TxErr) {
|
||||
err := updateAttributeViewColRollup(operation)
|
||||
if nil != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue