Merge tag 'v2.7.2' into instance_only_statuses
This commit is contained in:
@ -60,6 +60,8 @@ export default class Card extends React.PureComponent {
|
||||
maxDescription: PropTypes.number,
|
||||
onOpenMedia: PropTypes.func.isRequired,
|
||||
compact: PropTypes.bool,
|
||||
defaultWidth: PropTypes.number,
|
||||
cacheWidth: PropTypes.func,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@ -68,7 +70,7 @@ export default class Card extends React.PureComponent {
|
||||
};
|
||||
|
||||
state = {
|
||||
width: 280,
|
||||
width: this.props.defaultWidth || 280,
|
||||
embedded: false,
|
||||
};
|
||||
|
||||
@ -111,6 +113,7 @@ export default class Card extends React.PureComponent {
|
||||
|
||||
setRef = c => {
|
||||
if (c) {
|
||||
if (this.props.cacheWidth) this.props.cacheWidth(c.offsetWidth);
|
||||
this.setState({ width: c.offsetWidth });
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
render () {
|
||||
const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status;
|
||||
const status = (this.props.status && this.props.status.get('reblog')) ? this.props.status.get('reblog') : this.props.status;
|
||||
const intl = this.props.intl;
|
||||
const outerStyle = { boxSizing: 'border-box' };
|
||||
const { compact } = this.props;
|
||||
|
Reference in New Issue
Block a user