🎨 Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443

This commit is contained in:
Daniel 2024-03-04 21:58:26 +08:00
parent 30db8f4eb0
commit 4545cb11fe
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1380,7 +1380,7 @@ func (tx *Transaction) doRemoveAttrViewView(operation *Operation) (ret *TxErr) {
attrs := parse.IAL2Map(node.KramdownIAL)
blockViewID := attrs[av.NodeAttrView]
if blockViewID == viewID {
delete(attrs, av.NodeAttrView)
attrs[av.NodeAttrView] = attrView.ViewID
oldAttrs, e := setNodeAttrs0(node, attrs)
if nil != e {
logging.LogErrorf("set node attrs failed: %s", e)
@ -1701,7 +1701,7 @@ func setAttributeViewPageSize(operation *Operation) (err error) {
return
}
view, err := attrView.GetCurrentView(operation.ID)
view, err := getAttrViewViewByBlockID(attrView, operation.BlockID)
if nil != err {
return
}