sforkowany z mirror/soapbox
Make display media option work properly
rodzic
c59ad985e5
commit
3a1bb8f19b
|
@ -112,6 +112,7 @@ class Status extends ImmutablePureComponent {
|
|||
// Track height changes we know about to compensate scrolling
|
||||
componentDidMount() {
|
||||
this.didShowCard = !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card');
|
||||
this.setState({ showMedia: defaultMediaVisibility(this.props.status, this.props.displayMedia) });
|
||||
}
|
||||
|
||||
getSnapshotBeforeUpdate() {
|
||||
|
|
|
@ -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,17 +134,19 @@ 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,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.props.dispatch(fetchStatus(this.props.params.statusId));
|
||||
attachFullscreenListener(this.onFullScreenChange);
|
||||
this.setState({ showMedia: defaultMediaVisibility(this.props.status, this.props.displayMedia) });
|
||||
}
|
||||
|
||||
handleToggleMediaVisibility = () => {
|
||||
|
|
Ładowanie…
Reference in New Issue