Fix long-running subscriptions clogging things up

This commit is contained in:
Jon Staab
2025-02-13 14:26:00 -08:00
parent 7f6a1bff34
commit 07dd1e97dc
6 changed files with 75 additions and 42 deletions
+8 -1
View File
@@ -8,6 +8,8 @@
const {value} = $props()
let hideImage = $state(false)
const url = value.url.toString()
const loadPreview = async () => {
@@ -20,6 +22,10 @@
return json
}
const onError = () => {
hideImage = true
}
const expand = () => pushModal(ContentLinkDetail, {url}, {fullscreen: true})
</script>
@@ -40,9 +46,10 @@
</div>
{:then preview}
<div class="bg-alt flex max-w-xl flex-col leading-normal">
{#if preview.image}
{#if preview.image && !hideImage}
<img
alt="Link preview"
onerror={onError}
src={imgproxy(preview.image)}
class="bg-alt max-h-72 object-contain object-center" />
{/if}