From a91059c280fcef0f0c04cffcf2e6b6bafea779f3 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 21 Feb 2023 11:00:54 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=9B=B4=E6=94=B9=E7=88=B6=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=A0=87=E9=A2=98=E6=88=96=E8=80=85=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=88=B6=E6=96=87=E6=A1=A3=E5=90=8E=E4=BD=BF=E7=94=A8=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=8F=E6=8E=A8=E9=80=81=E5=AD=90=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E8=BF=9B=E5=BA=A6=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/7422?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/box.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/kernel/model/box.go b/kernel/model/box.go index 1410ac4f8..e96560460 100644 --- a/kernel/model/box.go +++ b/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) } }