0
0
Fork 0

Pinned statuses (#4675)

* Pinned statuses

* yarn manage:translations
This commit is contained in:
Eugen Rochko 2017-08-25 01:41:18 +02:00 committed by GitHub
parent c5157ef07b
commit 9caa90025f
59 changed files with 493 additions and 29 deletions

View file

@ -12,6 +12,8 @@ import {
unfavourite,
reblog,
unreblog,
pin,
unpin,
} from '../../actions/interactions';
import {
replyCompose,
@ -87,6 +89,14 @@ export default class Status extends ImmutablePureComponent {
}
}
handlePin = (status) => {
if (status.get('pinned')) {
this.props.dispatch(unpin(status));
} else {
this.props.dispatch(pin(status));
}
}
handleReplyClick = (status) => {
this.props.dispatch(replyCompose(status, this.context.router.history));
}
@ -187,6 +197,7 @@ export default class Status extends ImmutablePureComponent {
onDelete={this.handleDeleteClick}
onMention={this.handleMentionClick}
onReport={this.handleReport}
onPin={this.handlePin}
/>
{descendants}