mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Improve status bar index creation information prompt https://github.com/siyuan-note/siyuan/issues/15390
This commit is contained in:
parent
2f57e57b92
commit
9da208ec52
2 changed files with 5 additions and 5 deletions
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue