From e7e80e99bd57d2f2b00be09ebce38f1bd9f1b945 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 31 Jan 2023 14:16:48 +0100 Subject: [PATCH] :bug: Fix thumbnail not updating when changing pages --- frontend/src/app/main/data/workspace/thumbnails.cljs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/app/main/data/workspace/thumbnails.cljs b/frontend/src/app/main/data/workspace/thumbnails.cljs index 78740ac677..d012264d02 100644 --- a/frontend/src/app/main/data/workspace/thumbnails.cljs +++ b/frontend/src/app/main/data/workspace/thumbnails.cljs @@ -77,6 +77,11 @@ ;; Delete the thumbnail first so if we interrupt we can regenerate after (->> (rp/cmd! :upsert-file-object-thumbnail params) (rx/catch #(rx/empty))) + + ;; Remove the thumbnail temporary. If the user changes pages the thumbnail is regenerated + (rx/of #(update % :workspace-thumbnails assoc object-id nil)) + + ;; Send the update to the back-end (->> blob-result (rx/merge-map (fn [blob]