浏览代码

fix: prefer kv/graph-uuid to determine whether a rtc graph

Tienson Qin 7 月之前
父节点
当前提交
e93417be56
共有 2 个文件被更改,包括 1 次插入6 次删除
  1. 1 1
      src/main/frontend/components/header.cljs
  2. 0 5
      src/main/frontend/state.cljs

+ 1 - 1
src/main/frontend/components/header.cljs

@@ -376,7 +376,7 @@
 
      [:div.r.flex.drag-region
       (when (and current-repo
-                 (state/rtc-graph? current-repo)
+                 (ldb/get-graph-rtc-uuid (db/get-db))
                  (user-handler/logged-in?)
                  (config/db-based-graph? current-repo)
                  (user-handler/team-member?))

+ 0 - 5
src/main/frontend/state.cljs

@@ -925,11 +925,6 @@ Similar to re-frame subscriptions"
   []
   (:rtc/graphs @state))
 
-(defn rtc-graph?
-  [graph]
-  (some (fn [rtc-graph]
-          (= (:url rtc-graph) graph)) (get-rtc-graphs)))
-
 (defn get-remote-graph-info-by-uuid
   [uuid]
   (when-let [graphs (seq (get-in @state [:file-sync/remote-graphs :graphs]))]