From c5173d2df8be6ea90c6680c8b655851f30879d70 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Mon, 30 Sep 2024 15:33:17 +0200 Subject: [PATCH] Remove hidden token theme when activating a theme --- frontend/src/app/main/data/tokens.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/tokens.cljs b/frontend/src/app/main/data/tokens.cljs index 79d771671..4c87649d3 100644 --- a/frontend/src/app/main/data/tokens.cljs +++ b/frontend/src/app/main/data/tokens.cljs @@ -125,8 +125,11 @@ active-token-themes (some-> tokens-lib (ctob/toggle-theme-active? group name) (ctob/get-active-theme-paths)) + active-token-themes' (if (= active-token-themes #{ctob/hidden-token-theme-path}) + active-token-themes + (disj active-token-themes ctob/hidden-token-theme-path)) changes (-> (pcb/empty-changes it) - (pcb/update-active-token-themes active-token-themes prev-active-token-themes))] + (pcb/update-active-token-themes active-token-themes' prev-active-token-themes))] (rx/of (dch/commit-changes changes) (wtu/update-workspace-tokens))))))