mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 02:34:20 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
7492913ddd
commit
c1ff45f4a4
9 changed files with 54 additions and 63 deletions
|
|
@ -187,23 +187,27 @@ func IndexRefs() {
|
|||
}
|
||||
|
||||
func init() {
|
||||
eventbus.Subscribe(eventbus.EvtSQLInsertBlocks, func(context map[string]interface{}, blockCount int, hash string) {
|
||||
//eventbus.Subscribe(eventbus.EvtSQLInsertBlocks, func(context map[string]interface{}, current, total, blockCount int, hash string) {
|
||||
// if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
|
||||
// // Android/iOS 端不显示数据索引和搜索索引状态提示 https://github.com/siyuan-note/siyuan/issues/6392
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// msg := fmt.Sprintf(Conf.Language(89), current, total, blockCount, hash)
|
||||
// util.SetBootDetails(msg)
|
||||
// util.ContextPushMsg(context, msg)
|
||||
//})
|
||||
eventbus.Subscribe(eventbus.EvtSQLInsertBlocksFTS, func(context map[string]interface{}, current, total, blockCount int, hash string) {
|
||||
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
|
||||
// Android/iOS 端不显示数据索引和搜索索引状态提示 https://github.com/siyuan-note/siyuan/issues/6392
|
||||
return
|
||||
}
|
||||
|
||||
msg := fmt.Sprintf(Conf.Language(89), blockCount, hash)
|
||||
util.SetBootDetails(msg)
|
||||
util.ContextPushMsg(context, msg)
|
||||
})
|
||||
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
|
||||
}
|
||||
|
||||
msg := fmt.Sprintf(Conf.Language(90), blockCount, hash)
|
||||
msg := fmt.Sprintf(Conf.Language(90), current, total, blockCount, hash)
|
||||
util.SetBootDetails(msg)
|
||||
util.ContextPushMsg(context, msg)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue