mirror of https://github.com/logseq/logseq
fix: blocks indice wasn't built after downloading a remote graph
fixes LOG-3117pull/11055/head
parent
f814216042
commit
afd9bd14da
|
@ -187,11 +187,13 @@
|
|||
;; Parameters for the `persist-db` function, to show the notification messages
|
||||
(defn- graph-switch-on-persisted
|
||||
"graph: the target graph to switch to"
|
||||
[graph _opts]
|
||||
[graph opts]
|
||||
(p/do!
|
||||
(repo-handler/restore-and-setup-repo! graph)
|
||||
(graph-switch graph)
|
||||
(state/set-state! :sync-graph/init? false)))
|
||||
(repo-handler/restore-and-setup-repo! graph)
|
||||
(graph-switch graph)
|
||||
(state/set-state! :sync-graph/init? false)
|
||||
(when (:rtc-download? opts)
|
||||
(and (search-handler/rebuild-indices!) true))))
|
||||
|
||||
(defmethod handle :graph/switch [[_ graph opts]]
|
||||
(state/set-state! :db/async-queries #{})
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
[frontend.handler.notification :as notification]
|
||||
[frontend.state :as state]
|
||||
[promesa.core :as p]
|
||||
[frontend.util :as util]
|
||||
[logseq.db :as ldb]))
|
||||
|
||||
(defmulti handle identity)
|
||||
|
@ -28,7 +27,7 @@
|
|||
|
||||
(defmethod handle :add-repo [_ _worker data]
|
||||
(state/add-repo! {:url (:repo data)})
|
||||
(state/pub-event! [:graph/switch (:repo data) {}]))
|
||||
(state/pub-event! [:graph/switch (:repo data) {:rtc-download? true}]))
|
||||
|
||||
(defmethod handle :rtc-sync-state [_ _worker data]
|
||||
(let [state data]
|
||||
|
|
Loading…
Reference in New Issue