From 6c812b1ca986a21807500c53719d2bb2d07b7e6f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 8 Apr 2024 17:02:12 +0800 Subject: [PATCH] :recycle: Improve outline loading mechanism https://github.com/siyuan-note/siyuan/issues/10884 --- kernel/util/websocket.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/util/websocket.go b/kernel/util/websocket.go index 9cae9cd4c..868315739 100644 --- a/kernel/util/websocket.go +++ b/kernel/util/websocket.go @@ -221,12 +221,13 @@ func PushReloadDoc(rootID string) { } func PushSaveDoc(rootID, typ string, sources interface{}) { - data := map[string]interface{}{ + evt := NewCmdResult("savedoc", 0, PushModeBroadcast) + evt.Data = map[string]interface{}{ "rootID": rootID, "type": typ, "sources": sources, } - BroadcastByType("main", "savedoc", 0, "", data) + PushEvent(evt) } func PushProtyleReload(rootID string) {