From 7c6f304b2d3df89183e4c949e4ba83127a4812a9 Mon Sep 17 00:00:00 2001 From: "Lemmus.org" <137361180+lemmus-org@users.noreply.github.com> Date: Mon, 10 Jul 2023 07:22:12 -0700 Subject: [PATCH] Update post listing to prefer local image when available (#1858) --- src/shared/components/post/post-listing.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index eb4dc8d9..30b18659 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; }