1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(server, web): prevent reload when liking an asset (#7589)

pr feedback
This commit is contained in:
martin 2024-03-04 23:41:10 +01:00 committed by GitHub
parent 87c3d886ff
commit 935ddf3fbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,8 @@
let copyImageToClipboard: (source: string) => Promise<Blob>; let copyImageToClipboard: (source: string) => Promise<Blob>;
let canCopyImagesToClipboard: () => boolean; let canCopyImagesToClipboard: () => boolean;
const loadOriginalByDefault = $alwaysLoadOriginalFile && isWebCompatibleImage(asset);
$: if (imgElement) { $: if (imgElement) {
createZoomImageWheel(imgElement, { createZoomImageWheel(imgElement, {
maxZoom: 10, maxZoom: 10,
@ -126,7 +128,7 @@
transition:fade={{ duration: haveFadeTransition ? 150 : 0 }} transition:fade={{ duration: haveFadeTransition ? 150 : 0 }}
class="flex h-full select-none place-content-center place-items-center" class="flex h-full select-none place-content-center place-items-center"
> >
{#await loadAssetData({ loadOriginal: $alwaysLoadOriginalFile ? isWebCompatibleImage(asset) : false })} {#await loadAssetData({ loadOriginal: loadOriginalByDefault })}
<LoadingSpinner /> <LoadingSpinner />
{:then} {:then}
<div bind:this={imgElement} class="h-full w-full"> <div bind:this={imgElement} class="h-full w-full">