Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Reset doc browsing position after data snapshot rollback https://github.com/siyuan-note/siyuan/issues/8231

Liang Dingf570396fcdf4
diff --git a/kernel/util/websocket.go b/kernel/util/websocket.go
index 6407860f7e..d91d4c1c0b 100644
--- a/kernel/util/websocket.go
+++ b/kernel/util/websocket.go
@@ -121,15 +121,11 @@ func ClosePushChan(id string) {
}
func ReloadUIResetScroll() {
- evt := NewCmdResult("reloadui", 0, PushModeBroadcast)
- evt.Data = map[string]interface{}{"resetScroll": true}
- PushEvent(evt)
+ BroadcastByType("main", "reloadui", 0, "", map[string]interface{}{"resetScroll": true})
}
func ReloadUI() {
- evt := NewCmdResult("reloadui", 0, PushModeBroadcast)
- evt.Data = map[string]interface{}{"dropCurrentLayout": false}
- PushEvent(evt)
+ BroadcastByType("main", "reloadui", 0, "", nil)
}
func PushTxErr(msg string, code int, data interface{}) {