🎨 Improve duplicate doc

This commit is contained in:
Daniel 2025-08-05 16:55:48 +08:00
parent 5d4ef9890f
commit 9098b3f874
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -967,8 +967,13 @@ func DuplicateDoc(tree *parse.Tree) {
msgId := util.PushMsg(Conf.Language(116), 30000)
defer util.PushClearMsg(msgId)
previousPath := tree.Path
resetTree(tree, "Duplicated", false)
createTreeTx(tree)
box := Conf.Box(tree.Box)
if nil != box {
box.addSort(previousPath, tree.ID)
}
FlushTxQueue()
// 复制为副本时将该副本块插入到数据库中 https://github.com/siyuan-note/siyuan/issues/11959