const MediaGallery = React.createClass({
propTypes: {
- media: ImmutablePropTypes.list.isRequired
+ media: ImmutablePropTypes.list.isRequired,
+ height: React.PropTypes.number.isRequired
},
mixins: [PureRenderMixin],
});
return (
- <div style={{ marginTop: '8px', overflow: 'hidden', width: '100%', height: '110px', boxSizing: 'border-box' }}>
+ <div style={{ marginTop: '8px', overflow: 'hidden', width: '100%', height: `${this.props.height}px`, boxSizing: 'border-box' }}>
{children}
</div>
);
const mapStateToProps = (state, props) => ({
status: selectStatus(state, Number(props.params.statusId)),
- ancestors: selectStatuses(state, state.getIn(['timelines', 'ancestors', Number(props.params.statusId)], Immutable.List())),
- descendants: selectStatuses(state, state.getIn(['timelines', 'descendants', Number(props.params.statusId)], Immutable.List()))
+ ancestors: selectStatuses(state, state.getIn(['timelines', 'ancestors', Number(props.params.statusId)], Immutable.OrderedSet())),
+ descendants: selectStatuses(state, state.getIn(['timelines', 'descendants', Number(props.params.statusId)], Immutable.OrderedSet()))
});
const Status = React.createClass({
params: React.PropTypes.object.isRequired,
dispatch: React.PropTypes.func.isRequired,
status: ImmutablePropTypes.map,
- ancestors: ImmutablePropTypes.list.isRequired,
- descendants: ImmutablePropTypes.list.isRequired
+ ancestors: ImmutablePropTypes.orderedSet.isRequired,
+ descendants: ImmutablePropTypes.orderedSet.isRequired
},
mixins: [PureRenderMixin],
return <div>Loading {this.props.params.statusId}...</div>;
}
+ const account = status.get('account');
+
return (
- <div>
- {this.renderChildren(ancestors)}
+ <div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
+ <div>{this.renderChildren(ancestors)}</div>
+
<EmbeddedStatus status={status} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />
- {this.renderChildren(descendants)}
+
+ <div>{this.renderChildren(descendants)}</div>
</div>
);
}