Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion web/src/lib/components/asset-viewer/photo-viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
let copyImageToClipboard: (source: string) => Promise<Blob>;
let canCopyImagesToClipboard: () => boolean;

const loadOriginalByDefault = $alwaysLoadOriginalFile && isWebCompatibleImage(asset);

$: if (imgElement) {
createZoomImageWheel(imgElement, {
maxZoom: 10,
Expand Down Expand Up @@ -125,7 +127,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 })}
martabal marked this conversation as resolved.
Show resolved Hide resolved
{#await loadAssetData({ loadOriginal: loadOriginalByDefault })}
<LoadingSpinner />
{:then}
<div bind:this={imgElement} class="h-full w-full">
Expand Down