mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
enhance(capacitor): switch graphs
This commit is contained in:
@@ -47,10 +47,8 @@
|
||||
"graph: the target graph to switch to"
|
||||
[graph opts]
|
||||
(p/do!
|
||||
(repo-handler/restore-and-setup-repo! graph)
|
||||
;(graph-switch graph)
|
||||
(state/set-current-repo! graph)
|
||||
(state/set-state! :sync-graph/init? false)))
|
||||
(repo-handler/restore-and-setup-repo! graph {:ignore-style? true})
|
||||
(state/set-current-repo! graph)))
|
||||
|
||||
(defmethod handle :graph/switch [[_ graph opts]]
|
||||
(state/set-state! :db/async-queries {})
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
(when (config/global-config-enabled?)
|
||||
(global-config-handler/restore-global-config!))
|
||||
;; Don't have to unlisten the old listener, as it will be destroyed with the conn
|
||||
(ui-handler/add-style-if-exists!)
|
||||
(when-not (true? (:ignore-style? opts))
|
||||
(ui-handler/add-style-if-exists!))
|
||||
(when-not config/publishing?
|
||||
(state/set-db-restoring! false))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user