Browse Source

:art: 移动折叠标题后自动展开 https://github.com/siyuan-note/siyuan/issues/6673

Liang Ding 2 years ago
parent
commit
168d673a0c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      kernel/model/heading.go

+ 2 - 2
kernel/model/heading.go

@@ -34,7 +34,7 @@ import (
 
 func (tx *Transaction) doFoldHeading(operation *Operation) (ret *TxErr) {
 	headingID := operation.ID
-	tree, err := loadTreeByBlockID(headingID)
+	tree, err := tx.loadTree(headingID)
 	if nil != err {
 		return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
 	}
@@ -69,7 +69,7 @@ func (tx *Transaction) doFoldHeading(operation *Operation) (ret *TxErr) {
 func (tx *Transaction) doUnfoldHeading(operation *Operation) (ret *TxErr) {
 	headingID := operation.ID
 
-	tree, err := loadTreeByBlockID(headingID)
+	tree, err := tx.loadTree(headingID)
 	if nil != err {
 		return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
 	}