Browse Source

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

Liang Ding 2 years ago
parent
commit
a91059c280
1 changed files with 3 additions and 12 deletions
  1. 3 12
      kernel/model/box.go

+ 3 - 12
kernel/model/box.go

@@ -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)
 	}
 }