From 5fa3f70fb4ceaad13dca05def150f849efa605c7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 21 Jun 2019 18:32:15 +0200 Subject: [PATCH 1/3] feature flag for displaying edits as well --- src/components/structures/MessagePanel.js | 3 ++- src/components/views/rooms/EventTile.js | 2 +- src/shouldHideEvent.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 8352872a2d..6713d41574 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -576,6 +576,7 @@ module.exports = React.createClass({ const scrollToken = mxEv.status ? undefined : eventId; const readReceipts = this._readReceiptsByEvent[eventId]; + const editingEnabled = SettingsStore.isFeatureEnabled("feature_message_editing"); ret.push(
  • Date: Mon, 24 Jun 2019 16:53:31 +0200 Subject: [PATCH 2/3] cache setting where it's easy --- src/components/structures/MessagePanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 6713d41574..4238e22bd9 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -108,6 +108,7 @@ 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) @@ -576,7 +577,6 @@ module.exports = React.createClass({ const scrollToken = mxEv.status ? undefined : eventId; const readReceipts = this._readReceiptsByEvent[eventId]; - const editingEnabled = SettingsStore.isFeatureEnabled("feature_message_editing"); ret.push(
  • Date: Mon, 24 Jun 2019 16:53:42 +0200 Subject: [PATCH 3/3] adjust comment --- src/shouldHideEvent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shouldHideEvent.js b/src/shouldHideEvent.js index d82647dbdf..7a98c0dba6 100644 --- a/src/shouldHideEvent.js +++ b/src/shouldHideEvent.js @@ -46,7 +46,7 @@ export default function shouldHideEvent(ev) { // Hide redacted events if (ev.isRedacted() && !isEnabled('showRedactions')) return true; - // Hide replacement events since they update the original tile + // Hide replacement events since they update the original tile (if enabled) if (ev.isRelation("m.replace") && SettingsStore.isFeatureEnabled("feature_message_editing")) return true; const eventDiff = memberEventDiff(ev);