🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113

This commit is contained in:
Liang Ding 2023-01-26 00:47:14 +08:00
parent c1ff45f4a4
commit 7d1b50116b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
14 changed files with 51 additions and 52 deletions

View file

@ -197,16 +197,14 @@ func init() {
// util.SetBootDetails(msg)
// util.ContextPushMsg(context, msg)
//})
eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, current, total, blockCount int, hash string) {
eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, blockCount int, hash string) {
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
// Android/iOS 端不显示数据索引和搜索索引状态提示 https://github.com/siyuan-note/siyuan/issues/6392
return
}
if (1 > current && 1 == total) || current == total-1 {
current = total
}
current := context["current"]
total := context["total"]
msg := fmt.Sprintf(Conf.Language(90), current, total, blockCount, hash)
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)