Added isStatusCard to StatusPromotionPanel, StatusMedia

• Added:
- isStatusCard to StatusPromotionPanel, StatusMedia
This commit is contained in:
mgabdev 2020-08-05 23:27:35 -05:00
parent 8337c3011d
commit 6ffb95a63e
2 changed files with 4 additions and 1 deletions

View File

@ -119,6 +119,7 @@ class StatusPromotionPanel extends ImmutablePureComponent {
onOpenMedia={() => { }}
onToggleVisibility={() => { }}
onOpenVideo={() => { }}
isStatusCard
// width={this.props.cachedMediaWidth}
// cacheWidth={this.props.cacheMediaWidth}
// defaultWidth={this.props.cachedMediaWidth}

View File

@ -23,6 +23,7 @@ export default class StatusMedia extends ImmutablePureComponent {
defaultWidth: PropTypes.number,
cacheWidth: PropTypes.number,
isComposeModalOpen: PropTypes.bool,
isStatusCard: PropTypes.bool,
}
// Avoid checking props that are functions (and whose equality will always
@ -55,6 +56,7 @@ export default class StatusMedia extends ImmutablePureComponent {
defaultWidth,
cacheWidth,
isComposeModalOpen,
isStatusCard,
} = this.props
if (!status) return null
@ -117,7 +119,7 @@ export default class StatusMedia extends ImmutablePureComponent {
cacheWidth={cacheWidth}
defaultWidth={defaultWidth}
isComment={isComment}
isReduced={isComposeModalOpen}
isReduced={isStatusCard || isComposeModalOpen}
/>
)
}