From 60f4385fe60403d7a6cbd45d5ddf9113b4471450 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 13 May 2021 15:44:39 -0500 Subject: [PATCH] Card: ignore dimensions for links --- app/soapbox/features/status/components/card.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/soapbox/features/status/components/card.js b/app/soapbox/features/status/components/card.js index 544e852d8..676acf9ec 100644 --- a/app/soapbox/features/status/components/card.js +++ b/app/soapbox/features/status/components/card.js @@ -161,11 +161,9 @@ export default class Card extends React.PureComponent { return null; } - const cardWidth = card.get('width', card.getIn(['pleroma', 'opengraph', 'width'])); - const cardHeight = card.get('height', card.getIn(['pleroma', 'opengraph', 'height'])); const provider = card.get('provider_name').length === 0 ? decodeIDNA(getHostname(card.get('url'))) : card.get('provider_name'); const interactive = card.get('type') !== 'link'; - const horizontal = (!compact && cardWidth > cardHeight && (cardWidth + 100 >= width)) || interactive || embedded; + const horizontal = interactive || embedded; const className = classnames('status-card', { horizontal, compact, interactive }, `status-card--${card.get('type')}`); const title = interactive ? {card.get('title')} : {card.get('title')}; const ratio = this.getRatio(card);