mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-27 18:40:12 -05:00
Fix delete option missing from statuses in detailed view
This commit is contained in:
parent
15d01a5e08
commit
87ba52ad3f
@ -17,7 +17,8 @@ function selectStatuses(state, ids) {
|
|||||||
const mapStateToProps = (state, props) => ({
|
const mapStateToProps = (state, props) => ({
|
||||||
status: selectStatus(state, Number(props.params.statusId)),
|
status: selectStatus(state, Number(props.params.statusId)),
|
||||||
ancestors: selectStatuses(state, state.getIn(['timelines', 'ancestors', Number(props.params.statusId)], Immutable.OrderedSet())),
|
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()))
|
descendants: selectStatuses(state, state.getIn(['timelines', 'descendants', Number(props.params.statusId)], Immutable.OrderedSet())),
|
||||||
|
me: state.getIn(['timelines', 'me'])
|
||||||
});
|
});
|
||||||
|
|
||||||
const Status = React.createClass({
|
const Status = React.createClass({
|
||||||
@ -55,11 +56,11 @@ const Status = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
renderChildren (list) {
|
renderChildren (list) {
|
||||||
return list.map(s => <EmbeddedStatus status={s} key={s.get('id')} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />);
|
return list.map(s => <EmbeddedStatus status={s} me={this.props.me} key={s.get('id')} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />);
|
||||||
},
|
},
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { status, ancestors, descendants } = this.props;
|
const { status, ancestors, descendants, me } = this.props;
|
||||||
|
|
||||||
if (status === null) {
|
if (status === null) {
|
||||||
return <div>Loading {this.props.params.statusId}...</div>;
|
return <div>Loading {this.props.params.statusId}...</div>;
|
||||||
@ -71,7 +72,7 @@ const Status = React.createClass({
|
|||||||
<div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
|
<div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
|
||||||
<div>{this.renderChildren(ancestors)}</div>
|
<div>{this.renderChildren(ancestors)}</div>
|
||||||
|
|
||||||
<DetailedStatus status={status} />
|
<DetailedStatus status={status} me={me} />
|
||||||
<ActionBar status={status} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />
|
<ActionBar status={status} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />
|
||||||
|
|
||||||
<div>{this.renderChildren(descendants)}</div>
|
<div>{this.renderChildren(descendants)}</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user