mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 06:34:34 +00:00
fix(rtc): upload-graph
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
[:tags {:optional true} [:maybe [:sequential :uuid]]]
|
||||
[:properties {:optional true} [:maybe :string ; transit-json-string
|
||||
]]
|
||||
[:link {:optional true} :uuid]])
|
||||
[:link {:optional true} [:maybe :uuid]]])
|
||||
|
||||
(def general-attr-set
|
||||
(into #{} (map first) general-attrs-schema-coll))
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
(:require [cljs.core.async :as async :refer [<! go]]
|
||||
[fipp.edn :as fipp]
|
||||
[frontend.db :as db]
|
||||
[frontend.db.conn :as conn]
|
||||
[frontend.db.rtc.core :as rtc-core]
|
||||
[frontend.db.rtc.db-listener :as db-listener]
|
||||
[frontend.db.rtc.full-upload-download-graph :as full-upload-download-graph]
|
||||
[frontend.db.rtc.op-mem-layer :as op-mem-layer]
|
||||
[frontend.db.rtc.ws :as ws]
|
||||
@@ -58,7 +60,9 @@
|
||||
(go
|
||||
(let [state (<! (rtc-core/<init-state))
|
||||
repo (state/get-current-repo)]
|
||||
(<! (full-upload-download-graph/<upload-graph state repo)))))
|
||||
(<! (full-upload-download-graph/<upload-graph state repo))
|
||||
(let [conn (conn/get-db repo false)]
|
||||
(db-listener/listen-db-to-generate-ops repo conn)))))
|
||||
|
||||
(rum/defcs ^:large-vars/cleanup-todo rtc-debug-ui <
|
||||
rum/reactive
|
||||
|
||||
@@ -51,8 +51,10 @@
|
||||
(let [r (<! (get-result-ch))]
|
||||
(if-not (:graph-uuid r)
|
||||
(ex-info "upload graph failed" r)
|
||||
(do (op-mem-layer/update-graph-uuid! repo (:graph-uuid r))
|
||||
(do (op-mem-layer/init-empty-ops-store! repo)
|
||||
(op-mem-layer/update-graph-uuid! repo (:graph-uuid r))
|
||||
(op-mem-layer/update-local-tx! repo (:t r))
|
||||
(<! (op-mem-layer/<sync-to-idb-layer! repo))
|
||||
r)))))))
|
||||
|
||||
(def block-type-ident->str
|
||||
|
||||
Reference in New Issue
Block a user