From 9cede8f1a4405b86a3608e4088f075a62849d98f Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 2 Mar 2023 18:17:06 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=B1=9E=E6=80=A7=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E5=A2=9E=E5=87=8F=E8=A1=8C=20https://github.com/siyuan-note/si?= =?UTF-8?q?yuan/issues/7522?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/transaction.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go index 6c4adb2e1..bfabcf24c 100644 --- a/kernel/model/transaction.go +++ b/kernel/model/transaction.go @@ -213,6 +213,10 @@ func performTx(tx *Transaction) (ret *TxErr) { ret = tx.doUnfoldHeading(op) case "setAttrs": ret = tx.setAttrs(op) + case "insertAttrViewBlock": + ret = tx.insertAttrViewBlock(op) + case "removeAttrViewBlock": + ret = tx.removeAttrViewBlock(op) } if nil != ret { @@ -232,6 +236,14 @@ func performTx(tx *Transaction) (ret *TxErr) { return } +func (tx *Transaction) insertAttrViewBlock(operation *Operation) (ret *TxErr) { + return +} + +func (tx *Transaction) removeAttrViewBlock(operation *Operation) (ret *TxErr) { + return +} + func (tx *Transaction) doMove(operation *Operation) (ret *TxErr) { var err error id := operation.ID @@ -1021,6 +1033,7 @@ type Operation struct { ParentID string `json:"parentID"` PreviousID string `json:"previousID"` NextID string `json:"nextID"` + SrcIDs []string `json:"srcIDs"` // 用于将块拖拽到属性视图中 RetData interface{} `json:"retData"` discard bool // 用于标识是否在事务合并中丢弃