Skip to content

Commit

Permalink
fix: restore thumbnail load event
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Aug 27, 2024
1 parent f2a2743 commit 4c6ca93
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/components/general/FicsitCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@
let actionButtons: HTMLElement;
let imageLoaded = false;
let thumbnailLoaded = false;
$: {
renderedLogo;
imageLoaded = false;
}
$: {
renderedThumbhash;
thumbnailLoaded = false;
}
</script>

<div
Expand Down Expand Up @@ -90,8 +96,10 @@
{#if !imageLoaded && thumbHashData}
<img
class="logo absolute max-h-full min-h-full min-w-full max-w-full"
class:invisible={!thumbnailLoaded}
src={thumbHashData}
alt="{renderedName} Logo"
on:load={() => (thumbnailLoaded = true)}
in:fade={{ duration: 200 }}
out:fade={{ duration: 200, delay: 100 }} />
{/if}
Expand Down

0 comments on commit 4c6ca93

Please sign in to comment.