Add reblog menu with force modal
This commit is contained in:
parent
3c2840510d
commit
f832b5698a
7 changed files with 42 additions and 2 deletions
|
@ -310,7 +310,7 @@ class Status extends ImmutablePureComponent {
|
|||
this.props.dispatch(reblog(status, privacy));
|
||||
};
|
||||
|
||||
handleReblogClick = (status, e) => {
|
||||
handleReblogClick = (status, e, force = false) => {
|
||||
const { dispatch } = this.props;
|
||||
const { signedIn } = this.context.identity;
|
||||
|
||||
|
@ -318,7 +318,7 @@ class Status extends ImmutablePureComponent {
|
|||
if (status.get('reblogged')) {
|
||||
dispatch(unreblog(status));
|
||||
} else {
|
||||
if ((e && e.shiftKey) || !boostModal) {
|
||||
if (!force && ((e && e.shiftKey) || !boostModal)) {
|
||||
this.handleModalReblog(status);
|
||||
} else {
|
||||
dispatch(initBoostModal({ status, onReblog: this.handleModalReblog }));
|
||||
|
@ -333,6 +333,10 @@ class Status extends ImmutablePureComponent {
|
|||
}
|
||||
};
|
||||
|
||||
handleReblogForceModalClick = (status, e) => {
|
||||
this.handleReblogClick(status, e, true);
|
||||
};
|
||||
|
||||
handleBookmarkClick = (status) => {
|
||||
if (status.get('bookmarked')) {
|
||||
this.props.dispatch(unbookmark(status));
|
||||
|
@ -678,6 +682,7 @@ class Status extends ImmutablePureComponent {
|
|||
onFavourite={this.handleFavouriteClick}
|
||||
onEmojiReact={this.handleEmojiReact}
|
||||
onReblog={this.handleReblogClick}
|
||||
onReblogForceModal={this.handleReblogForceModalClick}
|
||||
onBookmark={this.handleBookmarkClick}
|
||||
onDelete={this.handleDeleteClick}
|
||||
onEdit={this.handleEditClick}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue