enhance(capacitor): switch graphs

This commit is contained in:
charlie
2025-05-19 17:07:17 +08:00
parent cc2d4ece15
commit 0e71cd9f2f
2 changed files with 4 additions and 5 deletions

View File

@@ -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 {})

View File

@@ -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))))