mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 07:19:38 +08:00
🧑💻 Push update block ID event https://github.com/siyuan-note/siyuan/issues/13434
This commit is contained in:
parent
50793ad855
commit
225adea9b6
@ -49,6 +49,7 @@ import (
|
|||||||
"github.com/siyuan-note/siyuan/kernel/av"
|
"github.com/siyuan-note/siyuan/kernel/av"
|
||||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||||
|
"github.com/siyuan-note/siyuan/kernel/task"
|
||||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||||
"github.com/siyuan-note/siyuan/kernel/util"
|
"github.com/siyuan-note/siyuan/kernel/util"
|
||||||
)
|
)
|
||||||
@ -612,6 +613,8 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IncSync()
|
IncSync()
|
||||||
|
|
||||||
|
task.AppendTask(task.UpdateIDs, util.PushUpdateIDs, blockIDs)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@ const (
|
|||||||
ReloadProtyle = "task.reload.protyle" // 重新加载编辑器
|
ReloadProtyle = "task.reload.protyle" // 重新加载编辑器
|
||||||
SetRefDynamicText = "task.ref.setDynamicText" // 设置引用的动态锚文本
|
SetRefDynamicText = "task.ref.setDynamicText" // 设置引用的动态锚文本
|
||||||
SetDefRefCount = "task.def.setRefCount" // 设置定义的引用计数
|
SetDefRefCount = "task.def.setRefCount" // 设置定义的引用计数
|
||||||
|
UpdateIDs = "task.update.ids" // 更新 ID
|
||||||
PushMsg = "task.push.msg" // 推送消息
|
PushMsg = "task.push.msg" // 推送消息
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -157,6 +158,7 @@ var uniqueActions = []string{
|
|||||||
ReloadProtyle,
|
ReloadProtyle,
|
||||||
SetRefDynamicText,
|
SetRefDynamicText,
|
||||||
SetDefRefCount,
|
SetDefRefCount,
|
||||||
|
UpdateIDs,
|
||||||
}
|
}
|
||||||
|
|
||||||
func ContainIndexTask() bool {
|
func ContainIndexTask() bool {
|
||||||
|
@ -241,6 +241,10 @@ func PushClearProgress() {
|
|||||||
BroadcastByType("main", "cprogress", 0, "", nil)
|
BroadcastByType("main", "cprogress", 0, "", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func PushUpdateIDs(ids map[string]string) {
|
||||||
|
BroadcastByType("main", "updateids", 0, "", ids)
|
||||||
|
}
|
||||||
|
|
||||||
func PushReloadDoc(rootID string) {
|
func PushReloadDoc(rootID string) {
|
||||||
BroadcastByType("main", "reloaddoc", 0, "", rootID)
|
BroadcastByType("main", "reloaddoc", 0, "", rootID)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user