mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🎨 Supports multiple views for the database https://github.com/siyuan-note/siyuan/issues/9751
This commit is contained in:
parent
eb6af31572
commit
19475004b4
3 changed files with 10 additions and 9 deletions
|
|
@ -294,7 +294,7 @@ func RenderAttributeView(avID, viewID string) (viewable av.Viewable, attrView *a
|
|||
|
||||
func renderAttributeView(attrView *av.AttributeView, viewID string) (viewable av.Viewable, err error) {
|
||||
if 1 > len(attrView.Views) {
|
||||
view := av.NewView()
|
||||
view, _ := av.NewView()
|
||||
attrView.Views = append(attrView.Views, view)
|
||||
attrView.ViewID = view.ID
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ func (tx *Transaction) doAddAttrViewView(operation *Operation) (ret *TxErr) {
|
|||
return &TxErr{code: TxErrCodeBlockNotFound, id: avID}
|
||||
}
|
||||
|
||||
view := av.NewView()
|
||||
view, _ := av.NewView()
|
||||
view.ID = operation.ID
|
||||
attrView.Views = append(attrView.Views, view)
|
||||
attrView.ViewID = view.ID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue