From e1b96f013ce7ea2e6773c130b55f21f2c8214604 Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Thu, 12 Dec 2024 16:35:11 -0500 Subject: [PATCH] Small optims --- src/lib/components/forms/ConfirmRedaction.svelte | 1 + src/lib/components/viewer/RedactionLayer.svelte | 14 +------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/lib/components/forms/ConfirmRedaction.svelte b/src/lib/components/forms/ConfirmRedaction.svelte index 7f84750c3..8a2961c9a 100644 --- a/src/lib/components/forms/ConfirmRedaction.svelte +++ b/src/lib/components/forms/ConfirmRedaction.svelte @@ -44,6 +44,7 @@ This almost certainly lives in a modal. if (result.type === "success") { // need to invalidate before navigating await invalidate(`document:${document.id}`); + $redactions = []; $pending = result.data.redactions; goto("?mode=document"); dispatch("close"); diff --git a/src/lib/components/viewer/RedactionLayer.svelte b/src/lib/components/viewer/RedactionLayer.svelte index ca9749109..d61e340be 100644 --- a/src/lib/components/viewer/RedactionLayer.svelte +++ b/src/lib/components/viewer/RedactionLayer.svelte @@ -28,13 +28,13 @@ So this layer is only showing unsaved redactions. export function clear() { redactions.set([]); + pending.set([]); }