mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 20:48:06 +01:00
⚡ 改进多个功能点的性能 https://github.com/siyuan-note/siyuan/issues/7177
This commit is contained in:
parent
5da5ae8818
commit
2b09ea75f0
7 changed files with 56 additions and 63 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue