From: Andre Vallestero Date: Fri, 8 May 2020 01:26:08 +0000 (-0400) Subject: Added externally hosted UI thumbnail support X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/static/gitweb.css?a=commitdiff_plain;h=bc8ad12b04a501bf670cc541b20282a791a3aac4;p=lemmy.git Added externally hosted UI thumbnail support --- diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index d0efa043..36a1e282 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -150,9 +150,9 @@ export class PostListing extends Component { let post = this.props.post; return ( ); @@ -163,6 +163,8 @@ export class PostListing extends Component { if (isImage(post.url)) { if (post.url.includes('pictshare')) { return pictshareImage(post.url, thumbnail); + } else if (post.thumbnail_url) { + return pictshareImage(post.thumbnail_url, thumbnail); } else { return post.url; } @@ -542,8 +544,9 @@ export class PostListing extends Component { } > @@ -586,8 +589,9 @@ export class PostListing extends Component { } > @@ -618,8 +622,9 @@ export class PostListing extends Component { data-tippy-content={i18n.t('view_source')} > @@ -639,8 +644,9 @@ export class PostListing extends Component { } > @@ -657,8 +663,9 @@ export class PostListing extends Component { } >