🎨 更改父文档标题或者移动父文档后使用状态栏推送子文档移动进度 https://github.com/siyuan-note/siyuan/issues/7422

This commit is contained in:
Liang Ding 2023-02-21 11:00:54 +08:00
parent 6faff1109c
commit a91059c280
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -385,10 +385,8 @@ func (box *Box) renameSubTrees(tree *parse.Tree) {
}
func (box *Box) moveTrees0(files []*FileInfo) {
totals := len(files) + 5
showProgress := 64 < totals
luteEngine := util.NewLute()
for i, subFile := range files {
for _, subFile := range files {
if !strings.HasSuffix(subFile.path, ".sy") {
continue
}
@ -400,15 +398,8 @@ func (box *Box) moveTrees0(files []*FileInfo) {
treenode.SetBlockTreePath(subTree)
sql.UpsertTreeQueue(subTree)
if showProgress {
msg := fmt.Sprintf(Conf.Language(107), subTree.HPath)
util.PushProgress(util.PushProgressCodeProgressed, i, totals, msg)
}
}
if showProgress {
util.ClearPushProgress(totals)
msg := fmt.Sprintf(Conf.Language(107), subTree.HPath)
util.PushStatusBar(msg)
}
}