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

This commit is contained in:
Daniel 2025-07-30 11:23:26 +08:00
parent 2f57e57b92
commit 9da208ec52
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 5 additions and 5 deletions

View file

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

View file

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