From 674f33917f4cf50326a87cdbecd0547cee05fe25 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 17 Jul 2019 16:56:15 +0100 Subject: [PATCH 1/2] Remove editing feature flag Part of https://github.com/vector-im/riot-web/issues/10282 --- src/MatrixClientPeg.js | 5 +---- src/components/structures/MessagePanel.js | 3 +-- src/components/views/messages/MessageActionBar.js | 6 +----- src/components/views/rooms/EventTile.js | 2 +- src/components/views/rooms/MessageComposerInput.js | 5 ++--- src/i18n/strings/en_EN.json | 1 - src/settings/Settings.js | 6 ------ src/shouldHideEvent.js | 2 +- 8 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index b2a63efd4c..d2760bc82c 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -208,9 +208,6 @@ class MatrixClientPeg { } _createClient(creds: MatrixClientCreds) { - const aggregateRelations = SettingsStore.isFeatureEnabled("feature_reactions"); - const enableEdits = SettingsStore.isFeatureEnabled("feature_message_editing"); - const opts = { baseUrl: creds.homeserverUrl, idBaseUrl: creds.identityServerUrl, @@ -220,7 +217,7 @@ class MatrixClientPeg { timelineSupport: true, forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false), verificationMethods: [verificationMethods.SAS], - unstableClientRelationAggregation: aggregateRelations || enableEdits, + unstableClientRelationAggregation: true, }; this.matrixClient = createMatrixClient(opts); diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 37a8a2d4c9..1fb0d6c725 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -110,7 +110,6 @@ module.exports = React.createClass({ }, componentWillMount: function() { - this._editingEnabled = SettingsStore.isFeatureEnabled("feature_message_editing"); // the event after which we put a visible unread marker on the last // render cycle; null if readMarkerVisible was false or the RM was // suppressed (eg because it was at the end of the timeline) @@ -586,7 +585,7 @@ module.exports = React.createClass({ ; } - if (this.isEditingEnabled() && canEditContent(this.props.mxEvent)) { + if (canEditContent(this.props.mxEvent)) { editButton = Date: Wed, 17 Jul 2019 17:00:36 +0100 Subject: [PATCH 2/2] Remove reactions feature flag Fixes https://github.com/vector-im/riot-web/issues/10282 --- src/components/views/messages/MessageActionBar.js | 9 --------- src/components/views/rooms/EventTile.js | 9 ++++----- src/i18n/strings/en_EN.json | 1 - src/settings/Settings.js | 6 ------ 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js index 4a0d4d5b07..6f58dd7bef 100644 --- a/src/components/views/messages/MessageActionBar.js +++ b/src/components/views/messages/MessageActionBar.js @@ -22,7 +22,6 @@ import sdk from '../../../index'; import dis from '../../../dispatcher'; import Modal from '../../../Modal'; import { createMenu } from '../../structures/ContextualMenu'; -import SettingsStore from '../../../settings/SettingsStore'; import { isContentActionable, canEditContent } from '../../../utils/EventUtils'; export default class MessageActionBar extends React.PureComponent { @@ -123,15 +122,7 @@ export default class MessageActionBar extends React.PureComponent { this.onFocusChange(true); } - isReactionsEnabled() { - return SettingsStore.isFeatureEnabled("feature_reactions"); - } - renderReactButton() { - if (!this.isReactionsEnabled()) { - return null; - } - const ReactMessageAction = sdk.getComponent('messages.ReactMessageAction'); const { mxEvent, reactions } = this.props; diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index ee1147c062..ae8b1ee5d3 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -202,7 +202,7 @@ module.exports = withMatrixClient(React.createClass({ const client = this.props.matrixClient; client.on("deviceVerificationChanged", this.onDeviceVerificationChanged); this.props.mxEvent.on("Event.decrypted", this._onDecrypted); - if (this.props.showReactions && SettingsStore.isFeatureEnabled("feature_reactions")) { + if (this.props.showReactions) { this.props.mxEvent.on("Event.relationsCreated", this._onReactionsCreated); } }, @@ -227,7 +227,7 @@ module.exports = withMatrixClient(React.createClass({ const client = this.props.matrixClient; client.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); this.props.mxEvent.removeListener("Event.decrypted", this._onDecrypted); - if (this.props.showReactions && SettingsStore.isFeatureEnabled("feature_reactions")) { + if (this.props.showReactions) { this.props.mxEvent.removeListener("Event.relationsCreated", this._onReactionsCreated); } }, @@ -490,8 +490,7 @@ module.exports = withMatrixClient(React.createClass({ getReactions() { if ( !this.props.showReactions || - !this.props.getRelationsForEvent || - !SettingsStore.isFeatureEnabled("feature_reactions") + !this.props.getRelationsForEvent ) { return null; } @@ -681,7 +680,7 @@ module.exports = withMatrixClient(React.createClass({ : null; let reactionsRow; - if (SettingsStore.isFeatureEnabled("feature_reactions") && !isRedacted) { + if (!isRedacted) { const ReactionsRow = sdk.getComponent('messages.ReactionsRow'); reactionsRow =