🎨 Improve open/remove notebook

This commit is contained in:
Daniel 2024-03-29 21:06:41 +08:00
parent c18b79d374
commit 8a0762f27b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -132,7 +132,12 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
}
targetNode.InsertAfter(heading)
} else {
return
// 移到最前
for i := len(headingChildren) - 1; i >= 0; i-- {
child := headingChildren[i]
tree.Root.PrependChild(child)
}
tree.Root.PrependChild(heading)
}
if err = tx.writeTree(tree); nil != err {