From 13163a457109445633fcaae2d54c5b3fc84aa41a Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 1 Aug 2024 15:37:53 +0200 Subject: [PATCH] Clean up debugging code --- .../src/app/main/ui/workspace/tokens/form.cljs | 2 +- .../app/main/ui/workspace/tokens/update.cljs | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/form.cljs b/frontend/src/app/main/ui/workspace/tokens/form.cljs index b159bac59..5094f29ef 100644 --- a/frontend/src/app/main/ui/workspace/tokens/form.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/form.cljs @@ -247,7 +247,7 @@ Token names should only contain letters and digits separated by . characters.")} final-description (assoc :description final-description) (:id token) (assoc :id (:id token)))] (st/emit! (dt/update-create-token new-token)) - (st/emit! (wtu/update-workspace-tokens-event)) + (st/emit! (wtu/update-workspace-tokens)) (modal/hide!)))))))))] [:form {:on-submit on-submit} diff --git a/frontend/src/app/main/ui/workspace/tokens/update.cljs b/frontend/src/app/main/ui/workspace/tokens/update.cljs index 0cdc67d18..255471bb4 100644 --- a/frontend/src/app/main/ui/workspace/tokens/update.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/update.cljs @@ -117,11 +117,7 @@ (actionize-shapes-update-info))) (defn update-workspace-tokens [] - (let [resolved-tokens (wtsd/get-cached-tokens @refs/workspace-tokens)] - (update-tokens resolved-tokens))) - -(defn update-workspace-tokens-event [] - (ptk/reify ::update-shape-position + (ptk/reify ::update-workspace-tokens ptk/WatchEvent (watch [_ state _] (->> @@ -135,14 +131,3 @@ (->> (update-tokens sd-tokens) (rx/concat))) (rx/of (dwu/commit-undo-transaction undo-id)))))))))) - -(comment - (->> (update-workspace-tokens) - (map rest) - (into [])) - - - (update-workspace-tokens) - - (st/emit! (update-workspace-tokens-event)) - nil)