mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 重建索引细节进度推送展现 https://github.com/siyuan-note/siyuan/issues/5890
This commit is contained in:
parent
9a7f61f715
commit
e52883fc3e
9 changed files with 89 additions and 133 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/olahol/melody"
|
||||
"github.com/siyuan-note/eventbus"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -150,6 +151,18 @@ func PushStatusBar(msg string) {
|
|||
BroadcastByType("main", "statusbar", 0, msg, nil)
|
||||
}
|
||||
|
||||
func ContextPushMsg(context map[string]interface{}, msg string) {
|
||||
switch context[eventbus.CtxPushMsg].(int) {
|
||||
case eventbus.CtxPushMsgToProgress:
|
||||
PushEndlessProgress(msg)
|
||||
case eventbus.CtxPushMsgToStatusBar:
|
||||
PushStatusBar(msg)
|
||||
case eventbus.CtxPushMsgToStatusBarAndProgress:
|
||||
PushStatusBar(msg)
|
||||
PushEndlessProgress(msg)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
PushProgressCodeProgressed = 0 // 有进度
|
||||
PushProgressCodeEndless = 1 // 无进度
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue