Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-04-20 21:22:45 +08:00
parent 4bbcc82998
commit 5cedae40ba
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 5 additions and 1 deletions

View file

@ -246,7 +246,7 @@ func NetAssets2LocalAssets(rootID string, onlyImg bool, originalURL string) (err
err = netAssets2LocalAssets0(tree, onlyImg, originalURL, assetsDirPath, true)
go func() {
time.Sleep(128 * time.Microsecond)
ReloadProtyle(rootID)
util.PushIsSyncing(rootID, false)
}()
return
}

View file

@ -351,6 +351,10 @@ func PushReloadProtyle(rootID string) {
BroadcastByType("protyle", "reload", 0, "", rootID)
}
func PushIsSyncing(rootID string, isSyncing bool) {
BroadcastByType("protyle", "isSyncing", 0, "", map[string]any{"rootID": rootID, "isSyncing": isSyncing})
}
func PushSetRefDynamicText(rootID, blockID, defBlockID, refText string) {
BroadcastByType("main", "setRefDynamicText", 0, "", map[string]any{"rootID": rootID, "blockID": blockID, "defBlockID": defBlockID, "refText": refText})
}