This commit is contained in:
Liang Ding 2023-01-27 18:07:06 +08:00
parent 5da5ae8818
commit 2b09ea75f0
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 56 additions and 63 deletions

View file

@ -892,18 +892,12 @@ func renameWriteJSONQueue(tree *parse.Tree, oldHPath string) (err error) {
return
}
func DuplicateDoc(rootID string) (ret *parse.Tree, err error) {
func DuplicateDoc(tree *parse.Tree) {
msgId := util.PushMsg(Conf.Language(116), 30000)
defer util.PushClearMsg(msgId)
WaitForWritingFiles()
ret, err = loadTreeByBlockID(rootID)
if nil != err {
return
}
resetTree(ret, "Duplicated")
createTreeTx(ret)
resetTree(tree, "Duplicated")
createTreeTx(tree)
WaitForWritingFiles()
return
}