about summary refs log tree commit diff
path: root/app/assets/javascripts/components
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-06 17:27:07 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-06 17:27:07 +0200
commit87ba52ad3f1e32b0608bb6c6ffb226c1988267a3 (patch)
tree44aa9eb9b79271f352bc0424ceedf7c75a6aeba3 /app/assets/javascripts/components
parent15d01a5e08dd13b55d6b67ea26d56894487c09a9 (diff)
Fix delete option missing from statuses in detailed view
Diffstat (limited to 'app/assets/javascripts/components')
-rw-r--r--app/assets/javascripts/components/features/status/index.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index 167864a1c..f7ce53e99 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -17,7 +17,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.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({
@@ -55,11 +56,11 @@ const Status = React.createClass({
   },
 
   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 () {
-    const { status, ancestors, descendants } = this.props;
+    const { status, ancestors, descendants, me } = this.props;
 
     if (status === null) {
       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>{this.renderChildren(ancestors)}</div>
 
-        <DetailedStatus status={status} />
+        <DetailedStatus status={status} me={me} />
         <ActionBar status={status} onReply={this.handleReplyClick} onFavourite={this.handleFavouriteClick} onReblog={this.handleReblogClick} />
 
         <div>{this.renderChildren(descendants)}</div>