From eaf568f1549e6ed5637340910209e40a297a6f6e Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 15 Aug 2024 14:26:22 +0200 Subject: [PATCH] Get tokens from current or first token set --- frontend/src/app/main/refs.cljs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 65efa9f93..66470e437 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -14,6 +14,7 @@ [app.common.types.shape.layout :as ctl] [app.main.data.workspace.state-helpers :as wsh] [app.main.store :as st] + [app.main.ui.workspace.tokens.token-set :as wtts] [okulary.core :as l])) ;; ---- Global refs @@ -234,10 +235,11 @@ (l/derived :workspace-data st/state)) (def workspace-tokens - (l/derived (fn [data] - (get data :tokens {})) - workspace-data - =)) + (l/derived + (fn [data] + (or (wtts/get-selected-token-set-tokens data) {})) + st/state + =)) (def workspace-file-colors (l/derived (fn [data]