Add foreign key to prevent reblogs of non-existent (after race conditions) statuses from happening
Fix issue with detailed status view not supporting unreblogging/unfavouriting
This commit is contained in:
parent
5ddad41245
commit
a1e96ae94f
3 changed files with 17 additions and 3 deletions
|
@ -66,7 +66,11 @@ const Status = React.createClass({
|
|||
},
|
||||
|
||||
handleFavouriteClick (status) {
|
||||
this.props.dispatch(favourite(status));
|
||||
if (status.get('favourited')) {
|
||||
this.props.dispatch(unfavourite(status));
|
||||
} else {
|
||||
this.props.dispatch(favourite(status));
|
||||
}
|
||||
},
|
||||
|
||||
handleReplyClick (status) {
|
||||
|
@ -74,7 +78,11 @@ const Status = React.createClass({
|
|||
},
|
||||
|
||||
handleReblogClick (status) {
|
||||
this.props.dispatch(reblog(status));
|
||||
if (status.get('reblogged')) {
|
||||
this.props.dispatch(unreblog(status));
|
||||
} else {
|
||||
this.props.dispatch(reblog(status));
|
||||
}
|
||||
},
|
||||
|
||||
handleDeleteClick (status) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue