diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index fd51f2fd..00e906ed 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -273,18 +273,22 @@ export class PostListing extends Component { } get img() { - const { post } = this.postView; - if (this.isoData.showAdultConsentModal) { return <>; } - if (this.imageSrc) { + // Use the full-size image for expands + const post = this.postView.post; + const url = post.url; + const thumbnail = post.thumbnail_url; + const imageSrc = url && isImage(url) ? url : thumbnail; + + if (imageSrc) { return ( <>
- - + +
@@ -293,7 +297,7 @@ export class PostListing extends Component { className="p-0 border-0 bg-transparent d-inline-block" onClick={linkEvent(this, this.handleImageExpandClick)} > - +
@@ -315,26 +319,12 @@ export class PostListing extends Component { ); } - get imageSrc(): string | undefined { - const post = this.postView.post; - const url = post.url; - const thumbnail = post.thumbnail_url; - - if (thumbnail) { - return thumbnail; - } else if (url && isImage(url)) { - return url; - } else { - return undefined; - } - } - thumbnail() { const post = this.postView.post; const url = post.url; const thumbnail = post.thumbnail_url; - if (!this.props.hideImage && url && isImage(url) && this.imageSrc) { + if (!this.props.hideImage && url && isImage(url) && thumbnail) { return ( ); - } else if ( - !this.props.hideImage && - url && - thumbnail && - this.imageSrc && - !isVideo(url) - ) { + } else if (!this.props.hideImage && url && thumbnail && !isVideo(url)) { return ( { title={url} target={this.linkTarget} > - {this.imgThumb(this.imageSrc)} + {this.imgThumb(thumbnail)}