about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/account
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-30 00:00:45 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-30 00:00:45 +0200
commitef2b50c9acf8bdc2119bfe3d8fe127d92f32c0a7 (patch)
tree932297efa748fcc0578303a12829246ddf0f3836 /app/assets/javascripts/components/features/account
parenta41c3487bd0564d0a27be5e3937aaf898e34f6f3 (diff)
Deleting statuses from UI
Diffstat (limited to 'app/assets/javascripts/components/features/account')
-rw-r--r--app/assets/javascripts/components/features/account/index.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/account/index.jsx b/app/assets/javascripts/components/features/account/index.jsx
index 5b09594cc..db0925d78 100644
--- a/app/assets/javascripts/components/features/account/index.jsx
+++ b/app/assets/javascripts/components/features/account/index.jsx
@@ -8,6 +8,7 @@ import {
   fetchAccountTimeline,
   expandAccountTimeline
 }                            from '../../actions/accounts';
+import { deleteStatus }      from '../../actions/statuses';
 import { replyCompose }      from '../../actions/compose';
 import { favourite, reblog } from '../../actions/interactions';
 import Header                from './components/header';
@@ -72,6 +73,10 @@ const Account = React.createClass({
     this.props.dispatch(favourite(status));
   },
 
+  handleDelete (status) {
+    this.props.dispatch(deleteStatus(status.get('id')));
+  },
+
   handleScrollToBottom () {
     this.props.dispatch(expandAccountTimeline(this.props.account.get('id')));
   },
@@ -87,7 +92,7 @@ const Account = React.createClass({
       <div style={{ display: 'flex', flexDirection: 'column', 'flex': '0 0 auto', height: '100%' }}>
         <Header account={account} />
         <ActionBar account={account} me={me} onFollow={this.handleFollow} onUnfollow={this.handleUnfollow} />
-        <StatusList statuses={statuses} onScrollToBottom={this.handleScrollToBottom} onReply={this.handleReply} onReblog={this.handleReblog} onFavourite={this.handleFavourite} />
+        <StatusList statuses={statuses} me={me} onScrollToBottom={this.handleScrollToBottom} onReply={this.handleReply} onReblog={this.handleReblog} onFavourite={this.handleFavourite} />
       </div>
     );
   }