Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

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

Liang Ding4849b20620dd
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go
index e635ef7593..48adc041b0 100644
--- a/kernel/model/transaction.go
+++ b/kernel/model/transaction.go
@@ -49,9 +49,11 @@ func IsFoldHeading(transactions *[]*Transaction) bool {
}
func IsUnfoldHeading(transactions *[]*Transaction) bool {
- if 1 == len(*transactions) && 1 == len((*transactions)[0].DoOperations) {
- if op := (*transactions)[0].DoOperations[0]; "unfoldHeading" == op.Action {
- return true
+ for _, tx := range *transactions {
+ for _, op := range tx.DoOperations {
+ if "unfoldHeading" == op.Action {
+ return true
+ }
}
}
return false