summaryrefslogtreecommitdiffhomepage
path: root/src/lib/components/CachedThumbnail.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/components/CachedThumbnail.svelte')
-rw-r--r--src/lib/components/CachedThumbnail.svelte5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/components/CachedThumbnail.svelte b/src/lib/components/CachedThumbnail.svelte
index 3a6d452..dada22a 100644
--- a/src/lib/components/CachedThumbnail.svelte
+++ b/src/lib/components/CachedThumbnail.svelte
@@ -6,9 +6,10 @@
interface Props {
path: string;
alt: string;
+ fileDate?: number;
}
- let { path, alt }: Props = $props();
+ let { path, alt, fileDate }: Props = $props();
let blobUrl = $state<string | undefined>(undefined);
let rawBlobUrl: string | undefined;
@@ -56,7 +57,7 @@
try {
const { blob, meta } = await flashair.fetchThumbnail(filePath);
// Store in cache (fire-and-forget)
- void imageCache.put('thumbnail', filePath, blob, meta);
+ void imageCache.put('thumbnail', filePath, blob, meta, fileDate);
const url = URL.createObjectURL(blob);
rawBlobUrl = url;
blobUrl = url;