Ver Fonte

:recycle: Improve outline loading mechanism https://github.com/siyuan-note/siyuan/issues/10884

Daniel há 1 ano atrás
pai
commit
6c812b1ca9
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      kernel/util/websocket.go

+ 3 - 2
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) {