mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
🎨 Supports multiple views for the database https://github.com/siyuan-note/siyuan/issues/9751
This commit is contained in:
parent
0cf13cca8f
commit
1f130d4b1c
2 changed files with 24 additions and 3 deletions
|
|
@ -687,7 +687,7 @@ func (tx *Transaction) doDuplicateAttrViewView(operation *Operation) (ret *TxErr
|
|||
attrView.ViewID = view.ID
|
||||
|
||||
view.Icon = masterView.Icon
|
||||
view.Name = masterView.Name
|
||||
view.Name = attrView.GetDuplicateViewName(masterView.Name)
|
||||
view.LayoutType = masterView.LayoutType
|
||||
|
||||
for _, col := range masterView.Table.Columns {
|
||||
|
|
@ -716,7 +716,6 @@ func (tx *Transaction) doDuplicateAttrViewView(operation *Operation) (ret *TxErr
|
|||
})
|
||||
}
|
||||
|
||||
attrView.ViewID = view.ID
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return &TxErr{code: TxErrWriteAttributeView, msg: err.Error(), id: avID}
|
||||
|
|
@ -748,7 +747,6 @@ func (tx *Transaction) doAddAttrViewView(operation *Operation) (ret *TxErr) {
|
|||
view.Table.Columns = append(view.Table.Columns, &av.ViewTableColumn{ID: col.ID})
|
||||
}
|
||||
|
||||
attrView.ViewID = view.ID
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return &TxErr{code: TxErrWriteAttributeView, msg: err.Error(), id: avID}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue