mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 更改父文档标题或者移动父文档后使用状态栏推送子文档移动进度 https://github.com/siyuan-note/siyuan/issues/7422
This commit is contained in:
parent
6faff1109c
commit
a91059c280
1 changed files with 3 additions and 12 deletions
|
|
@ -385,10 +385,8 @@ func (box *Box) renameSubTrees(tree *parse.Tree) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (box *Box) moveTrees0(files []*FileInfo) {
|
func (box *Box) moveTrees0(files []*FileInfo) {
|
||||||
totals := len(files) + 5
|
|
||||||
showProgress := 64 < totals
|
|
||||||
luteEngine := util.NewLute()
|
luteEngine := util.NewLute()
|
||||||
for i, subFile := range files {
|
for _, subFile := range files {
|
||||||
if !strings.HasSuffix(subFile.path, ".sy") {
|
if !strings.HasSuffix(subFile.path, ".sy") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -400,15 +398,8 @@ func (box *Box) moveTrees0(files []*FileInfo) {
|
||||||
|
|
||||||
treenode.SetBlockTreePath(subTree)
|
treenode.SetBlockTreePath(subTree)
|
||||||
sql.UpsertTreeQueue(subTree)
|
sql.UpsertTreeQueue(subTree)
|
||||||
|
msg := fmt.Sprintf(Conf.Language(107), subTree.HPath)
|
||||||
if showProgress {
|
util.PushStatusBar(msg)
|
||||||
msg := fmt.Sprintf(Conf.Language(107), subTree.HPath)
|
|
||||||
util.PushProgress(util.PushProgressCodeProgressed, i, totals, msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if showProgress {
|
|
||||||
util.ClearPushProgress(totals)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue