Explorar el Código

fix: import chosen graph

Tienson Qin hace 1 año
padre
commit
ff050779ec
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/main/frontend/handler/common/developer.cljs

+ 3 - 3
src/main/frontend/handler/common/developer.cljs

@@ -90,9 +90,9 @@
 
 (defn import-chosen-graph
   [repo]
-  (p/let [_ (persist-db/<unsafe-delete repo)
-          _ (persist-db/<fetch-init-data repo)]
-    (notification/show! "Graph updated!" :success)))
+  (p/let [_ (persist-db/<unsafe-delete repo)]
+    (notification/show! "Graph updated!" :success)
+    (state/pub-event! [:graph/switch repo])))
 
 (defn ^:export replace-graph-with-db-file []
   (state/set-state! :ui/open-select :db-graph-replace))