Media display improvements

- built in fullwidth styling
 - letterbox settings toggle
 - media no longer counts towards height when making toot-collapsing
measurements
This commit is contained in:
kibigo!
2017-06-30 02:15:18 -07:00
parent b525caf40a
commit ec2daae71c
11 changed files with 132 additions and 144 deletions

View File

@@ -37,6 +37,7 @@ const makeMapStateToProps = () => {
const mapStateToProps = (state, props) => ({
status: getStatus(state, Number(props.params.statusId)),
settings: state.get('local_settings'),
ancestorsIds: state.getIn(['contexts', 'ancestors', Number(props.params.statusId)]),
descendantsIds: state.getIn(['contexts', 'descendants', Number(props.params.statusId)]),
me: state.getIn(['meta', 'me']),
@@ -60,6 +61,7 @@ export default class Status extends ImmutablePureComponent {
params: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
status: ImmutablePropTypes.map,
settings: ImmutablePropTypes.map.isRequired,
ancestorsIds: ImmutablePropTypes.list,
descendantsIds: ImmutablePropTypes.list,
me: PropTypes.number,
@@ -143,7 +145,7 @@ export default class Status extends ImmutablePureComponent {
render () {
let ancestors, descendants;
const { status, ancestorsIds, descendantsIds, me, autoPlayGif } = this.props;
const { status, settings, ancestorsIds, descendantsIds, me, autoPlayGif } = this.props;
if (status === null) {
return (
@@ -172,6 +174,7 @@ export default class Status extends ImmutablePureComponent {
<DetailedStatus
status={status}
settings={settings}
autoPlayGif={autoPlayGif}
me={me}
onOpenVideo={this.handleOpenVideo}