diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-18 13:03:37 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-18 13:03:37 +0200 |
commit | 08896f7dcfe2a1732e17d3854ed3d79bdb61c73b (patch) | |
tree | 43e749dfade3894b59ad9d1df021b2f000925ab4 /app/assets/javascripts/components/features | |
parent | ab7291b8fe78bc03375bb64e3b458488fa8ce96a (diff) |
Detailed status view scrollable
Diffstat (limited to 'app/assets/javascripts/components/features')
-rw-r--r-- | app/assets/javascripts/components/features/status/index.jsx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx index 39bc2bec5..03719d88e 100644 --- a/app/assets/javascripts/components/features/status/index.jsx +++ b/app/assets/javascripts/components/features/status/index.jsx @@ -25,8 +25,8 @@ function selectStatuses(state, ids) { 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({ @@ -35,8 +35,8 @@ 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], @@ -74,11 +74,15 @@ const Status = React.createClass({ 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> ); } |