mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01: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)
|
task.AppendTask(task.ReloadUI, util.ReloadUI)
|
||||||
}
|
}
|
||||||
|
|
||||||
var fullReindexing bool
|
|
||||||
|
|
||||||
func fullReindex() {
|
func fullReindex() {
|
||||||
fullReindexing = true
|
pushSQLInsertBlocksFTSMsg = true
|
||||||
defer func() {
|
defer func() {
|
||||||
fullReindexing = false
|
pushSQLInsertBlocksFTSMsg = false
|
||||||
}()
|
}()
|
||||||
|
|
||||||
util.PushEndlessProgress(Conf.language(35))
|
util.PushEndlessProgress(Conf.language(35))
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,8 @@ func init() {
|
||||||
subscribeSQLEvents()
|
subscribeSQLEvents()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var pushSQLInsertBlocksFTSMsg bool
|
||||||
|
|
||||||
func subscribeSQLEvents() {
|
func subscribeSQLEvents() {
|
||||||
// 使用下面的 EvtSQLInsertBlocksFTS 就可以了
|
// 使用下面的 EvtSQLInsertBlocksFTS 就可以了
|
||||||
//eventbus.Subscribe(eventbus.EvtSQLInsertBlocks, func(context map[string]interface{}, current, total, blockCount int, hash string) {
|
//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)
|
// util.ContextPushMsg(context, msg)
|
||||||
//})
|
//})
|
||||||
eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, blockCount int, hash string) {
|
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
|
// Improve status bar index creation information prompt https://github.com/siyuan-note/siyuan/issues/15390
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue