From f44675a1e4dda9f4ba3dbb47da1ba355c3ad97a1 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 31 Aug 2021 12:09:14 +0200 Subject: [PATCH] :bug: Fix repeated fetch on file selection --- CHANGES.md | 3 ++- frontend/src/app/main/ui/dashboard/file_menu.cljs | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 398472818..95f8c5cc3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,7 +21,8 @@ - Prevent deleting or moving the drafts project [Taiga #1935](https://tree.taiga.io/project/penpot/issue/1935). - Fix problem with zoom and selection [Taiga #1919](https://tree.taiga.io/project/penpot/issue/1919) - Fix problem with borders on shape export [#1092](https://github.com/penpot/penpot/issues/1092) -- Fix thumbnail cropping issue [#Taiga 1964](https://tree.taiga.io/project/penpot/issue/1964) +- Fix thumbnail cropping issue [Taiga #1964](https://tree.taiga.io/project/penpot/issue/1964) +- Fix repeated fetch on file selection [Taiga #1933](https://tree.taiga.io/project/penpot/issue/1933) ### :arrow_up: Deps updates ### :boom: Breaking changes diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index 31207a0b9..265e0bc1f 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -175,10 +175,12 @@ :files files})))))))] (mf/use-effect + (mf/deps show?) (fn [] - (->> (rp/query! :all-projects) - (rx/map group-by-team) - (rx/subs #(reset! teams %))))) + (when show? + (->> (rp/query! :all-projects) + (rx/map group-by-team) + (rx/subs #(reset! teams %)))))) (when current-team (let [sub-options (conj (vec (for [project current-projects]