forked from coracle/flotilla
Fix long-running subscriptions clogging things up
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user