Merge branch 'make-display-media-option-work' into 'develop'
Make display media option work properly, fixes #509 Closes #509 See merge request soapbox-pub/soapbox-fe!375
This commit is contained in:
commit
9ba703e4f9
2 changed files with 4 additions and 2 deletions
|
@ -125,7 +125,7 @@ class Status extends ImmutablePureComponent {
|
|||
static getDerivedStateFromProps(nextProps, prevState) {
|
||||
if (nextProps.status && nextProps.status.get('id') !== prevState.statusId) {
|
||||
return {
|
||||
showMedia: defaultMediaVisibility(nextProps.status),
|
||||
showMedia: defaultMediaVisibility(nextProps.status, nextProps.displayMedia),
|
||||
statusId: nextProps.status.get('id'),
|
||||
};
|
||||
} else {
|
||||
|
|
|
@ -110,6 +110,7 @@ const makeMapStateToProps = () => {
|
|||
askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0,
|
||||
domain: state.getIn(['meta', 'domain']),
|
||||
me: state.get('me'),
|
||||
displayMedia: getSettings(state).get('displayMedia'),
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -133,11 +134,12 @@ class Status extends ImmutablePureComponent {
|
|||
intl: PropTypes.object.isRequired,
|
||||
askReplyConfirmation: PropTypes.bool,
|
||||
domain: PropTypes.string,
|
||||
displayMedia: PropTypes.string,
|
||||
};
|
||||
|
||||
state = {
|
||||
fullscreen: false,
|
||||
showMedia: defaultMediaVisibility(this.props.status),
|
||||
showMedia: defaultMediaVisibility(this.props.status, this.props.displayMedia),
|
||||
loadedStatusId: undefined,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue