Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve status bar index creation information prompt https://github.com/siyuan-note/siyuan/issues/15390

Daniel9da208ec524a
diff --git a/kernel/model/box.go b/kernel/model/box.go
index 2261f53789..abd9ad823f 100644
--- a/kernel/model/box.go
+++ b/kernel/model/box.go
@@ -676,12 +676,10 @@ func FullReindex() {
task.AppendTask(task.ReloadUI, util.ReloadUI)
}
-var fullReindexing bool
-
func fullReindex() {
- fullReindexing = true
+ pushSQLInsertBlocksFTSMsg = true
defer func() {
- fullReindexing = false
+ pushSQLInsertBlocksFTSMsg = false
}()
util.PushEndlessProgress(Conf.language(35))
diff --git a/kernel/model/index.go b/kernel/model/index.go
index fba733b617..ab8d64ccb3 100644
--- a/kernel/model/index.go
+++ b/kernel/model/index.go
@@ -359,6 +359,8 @@ func init() {
subscribeSQLEvents()
}
+var pushSQLInsertBlocksFTSMsg bool
+
func subscribeSQLEvents() {
// 使用下面的 EvtSQLInsertBlocksFTS 就可以了
//eventbus.Subscribe(eventbus.EvtSQLInsertBlocks, func(context map[string]interface{}, current, total, blockCount int, hash string) {
@@ -368,7 +370,7 @@ func subscribeSQLEvents() {
// util.ContextPushMsg(context, msg)
//})
eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, blockCount int, hash string) {
- if !fullReindexing {
+ if !pushSQLInsertBlocksFTSMsg {
// 如果不是全量重建索引,则不显示进度信息
// Improve status bar index creation information prompt https://github.com/siyuan-note/siyuan/issues/15390
return