From cbe29411df8b9570b4938373664fe06c73db6c15 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 7 Feb 2023 20:49:17 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=8E=BB=E6=8E=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=A2=9E=E9=87=8F=E7=B4=A2=E5=BC=95=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E7=95=8C=E9=9D=A2=E9=81=AE=E7=BD=A9=20Fix=20https://g?= =?UTF-8?q?ithub.com/siyuan-note/siyuan/issues/7278?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/sync.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/kernel/model/sync.go b/kernel/model/sync.go index fc3908c5b..e248478cf 100644 --- a/kernel/model/sync.go +++ b/kernel/model/sync.go @@ -187,13 +187,8 @@ func checkSync(boot, exit, byHand bool) bool { // incReindex 增量重建索引。 func incReindex(upserts, removes []string) { util.IncBootProgress(3, "Sync reindexing...") - needPushRemoveProgress := 32 < len(removes) - needPushUpsertProgress := 32 < len(upserts) msg := fmt.Sprintf(Conf.Language(35)) util.PushStatusBar(msg) - if needPushRemoveProgress || needPushUpsertProgress { - util.PushEndlessProgress(msg) - } // 先执行 remove,否则移动文档时 upsert 会被忽略,导致未被索引 bootProgressPart := 10 / float64(len(removes)) @@ -208,9 +203,6 @@ func incReindex(upserts, removes []string) { msg = fmt.Sprintf(Conf.Language(39), block.RootID) util.IncBootProgress(bootProgressPart, msg) util.PushStatusBar(msg) - if needPushRemoveProgress { - util.PushEndlessProgress(msg) - } treenode.RemoveBlockTreesByRootID(block.RootID) sql.RemoveTreeQueue(block.BoxID, block.RootID) @@ -219,9 +211,6 @@ func incReindex(upserts, removes []string) { msg = fmt.Sprintf(Conf.Language(35)) util.PushStatusBar(msg) - if needPushRemoveProgress || needPushUpsertProgress { - util.PushEndlessProgress(msg) - } bootProgressPart = 10 / float64(len(upserts)) for _, upsertFile := range upserts { @@ -244,9 +233,6 @@ func incReindex(upserts, removes []string) { msg = fmt.Sprintf(Conf.Language(40), strings.TrimSuffix(path.Base(p), ".sy")) util.IncBootProgress(bootProgressPart, msg) util.PushStatusBar(msg) - if needPushUpsertProgress { - util.PushEndlessProgress(msg) - } tree, err0 := LoadTree(box, p) if nil != err0 {