From: Lemmus.org <137361180+lemmus-org@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:22:12 +0000 (-0700) Subject: Update post listing to prefer local image when available (#1858) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%7Bthis.props.src%7D?a=commitdiff_plain;h=1bd705d7bc446b729510ab0b23a8c42e99c5cfe3;p=lemmy-ui.git Update post listing to prefer local image when available (#1858) --- diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index eb4dc8d..30b1865 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -310,16 +310,10 @@ export class PostListing extends Component { const url = post.url; const thumbnail = post.thumbnail_url; - if (url && isImage(url)) { - if (url.includes("pictrs")) { - return url; - } else if (thumbnail) { - return thumbnail; - } else { - return url; - } - } else if (thumbnail) { + if (thumbnail) { return thumbnail; + } else if (url && isImage(url)) { + return url; } else { return undefined; }