From 935ddf3fbdcb3ebddd809fce8abb4e3ebca4fcb6 Mon Sep 17 00:00:00 2001 From: martin <74269598+martabal@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:41:10 +0100 Subject: [PATCH] fix(server, web): prevent reload when liking an asset (#7589) pr feedback --- web/src/lib/components/asset-viewer/photo-viewer.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/lib/components/asset-viewer/photo-viewer.svelte b/web/src/lib/components/asset-viewer/photo-viewer.svelte index 9191de6088..00ef670c9c 100644 --- a/web/src/lib/components/asset-viewer/photo-viewer.svelte +++ b/web/src/lib/components/asset-viewer/photo-viewer.svelte @@ -26,6 +26,8 @@ let copyImageToClipboard: (source: string) => Promise; let canCopyImagesToClipboard: () => boolean; + const loadOriginalByDefault = $alwaysLoadOriginalFile && isWebCompatibleImage(asset); + $: if (imgElement) { createZoomImageWheel(imgElement, { maxZoom: 10, @@ -126,7 +128,7 @@ transition:fade={{ duration: haveFadeTransition ? 150 : 0 }} class="flex h-full select-none place-content-center place-items-center" > - {#await loadAssetData({ loadOriginal: $alwaysLoadOriginalFile ? isWebCompatibleImage(asset) : false })} + {#await loadAssetData({ loadOriginal: loadOriginalByDefault })} {:then}