flavors: glitch: add quote handling to status feature

pull/36/head
Ariadne Conill 2022-12-26 01:31:57 +00:00
parent c7e00d4c4e
commit a47d917072
1 changed files with 16 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import {
} from 'flavours/glitch/actions/interactions';
import {
replyCompose,
quoteCompose,
mentionCompose,
directCompose,
} from 'flavours/glitch/actions/compose';
@ -321,6 +322,20 @@ class Status extends ImmutablePureComponent {
}
}
handleQuoteClick = (status) => {
const { signedIn } = this.context.identity;
if (signedIn) {
dispatch(quoteCompose(status, this.context.router.history));
} else {
dispatch(openModal('INTERACTION', {
type: 'reply',
accountId: status.getIn(['account', 'id']),
url: status.get('url'),
}));
}
}
handleModalReblog = (status, privacy) => {
const { dispatch } = this.props;
@ -679,6 +694,7 @@ class Status extends ImmutablePureComponent {
onFavourite={this.handleFavouriteClick}
onReblog={this.handleReblogClick}
onBookmark={this.handleBookmarkClick}
onQuote={this.handleQuoteClick}
onDelete={this.handleDeleteClick}
onEdit={this.handleEditClick}
onDirect={this.handleDirectClick}