From 304d281ed2ae4801cba26441ee948f30ab2b791c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 16 Dec 2017 19:01:56 +0000 Subject: [PATCH] change reply to be its own thing Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/context_menus/MessageContextMenu.js | 38 ++++++++++++------- src/i18n/strings/en_EN.json | 3 +- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index f2a10674..84bebc13 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -25,6 +25,7 @@ import { _t } from 'matrix-react-sdk/lib/languageHandler'; const Modal = require('matrix-react-sdk/lib/Modal'); const Resend = require("matrix-react-sdk/lib/Resend"); import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore"; +import {makeEventPermalink} from 'matrix-react-sdk/lib/matrix-to'; module.exports = React.createClass({ displayName: 'MessageContextMenu', @@ -170,17 +171,18 @@ module.exports = React.createClass({ }, onQuoteClick: function() { - if (SettingsStore.isFeatureEnabled("feature_rich_quoting")) { - dis.dispatch({ - action: 'quote_event', - event: this.props.mxEvent, - }); - } else { - dis.dispatch({ - action: 'quote', - text: this.props.eventTileOps.getInnerText(), - }); - } + dis.dispatch({ + action: 'quote', + text: this.props.eventTileOps.getInnerText(), + }); + this.closeMenu(); + }, + + onReplyClick: function() { + dis.dispatch({ + action: 'quote_event', + event: this.props.mxEvent, + }); this.closeMenu(); }, @@ -197,6 +199,7 @@ module.exports = React.createClass({ let permalinkButton; let externalURLButton; let quoteButton; + let replyButton; if (eventStatus === 'not_sent') { resendButton = ( @@ -268,8 +271,8 @@ module.exports = React.createClass({ // XXX: if we use room ID, we should also include a server where the event can be found (other than in the domain of the event ID) permalinkButton = (
); @@ -279,6 +282,14 @@ module.exports = React.createClass({ { _t('Quote') } ); + + if (SettingsStore.isFeatureEnabled("feature_rich_quoting")) { + replyButton = ( +