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={() => { }} onOpenMedia={() => { }}
onToggleVisibility={() => { }} onToggleVisibility={() => { }}
onOpenVideo={() => { }} onOpenVideo={() => { }}
isStatusCard
// width={this.props.cachedMediaWidth} // width={this.props.cachedMediaWidth}
// cacheWidth={this.props.cacheMediaWidth} // cacheWidth={this.props.cacheMediaWidth}
// defaultWidth={this.props.cachedMediaWidth} // defaultWidth={this.props.cachedMediaWidth}

View File

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