From a47d91707240dc6160ef00adb36f991d84acb1a5 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 26 Dec 2022 01:31:57 +0000 Subject: [PATCH] flavors: glitch: add quote handling to status feature --- .../flavours/glitch/features/status/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index aaa9c7928f..1e9cafa241 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -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}