Merge pull request #3132 from matrix-org/bwindels/edit-full-feature-flag
feature flag for displaying edits as well
This commit is contained in:
commit
a9b5d2095c
3 changed files with 5 additions and 4 deletions
|
@ -108,6 +108,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
|
this._editingEnabled = SettingsStore.isFeatureEnabled("feature_message_editing");
|
||||||
// the event after which we put a visible unread marker on the last
|
// the event after which we put a visible unread marker on the last
|
||||||
// render cycle; null if readMarkerVisible was false or the RM was
|
// render cycle; null if readMarkerVisible was false or the RM was
|
||||||
// suppressed (eg because it was at the end of the timeline)
|
// suppressed (eg because it was at the end of the timeline)
|
||||||
|
@ -585,7 +586,7 @@ module.exports = React.createClass({
|
||||||
<EventTile mxEvent={mxEv}
|
<EventTile mxEvent={mxEv}
|
||||||
continuation={continuation}
|
continuation={continuation}
|
||||||
isRedacted={mxEv.isRedacted()}
|
isRedacted={mxEv.isRedacted()}
|
||||||
replacingEventId={mxEv.replacingEventId()}
|
replacingEventId={this._editingEnabled && mxEv.replacingEventId()}
|
||||||
editState={isEditing && this.props.editState}
|
editState={isEditing && this.props.editState}
|
||||||
onHeightChanged={this._onHeightChanged}
|
onHeightChanged={this._onHeightChanged}
|
||||||
readReceipts={readReceipts}
|
readReceipts={readReceipts}
|
||||||
|
|
|
@ -829,7 +829,7 @@ module.exports.haveTileForEvent = function(e) {
|
||||||
if (e.isRedacted() && !isMessageEvent(e)) return false;
|
if (e.isRedacted() && !isMessageEvent(e)) return false;
|
||||||
|
|
||||||
// No tile for replacement events since they update the original tile
|
// No tile for replacement events since they update the original tile
|
||||||
if (e.isRelation("m.replace")) return false;
|
if (e.isRelation("m.replace") && SettingsStore.isFeatureEnabled("feature_message_editing")) return false;
|
||||||
|
|
||||||
const handler = getHandlerTile(e);
|
const handler = getHandlerTile(e);
|
||||||
if (handler === undefined) return false;
|
if (handler === undefined) return false;
|
||||||
|
|
|
@ -46,8 +46,8 @@ export default function shouldHideEvent(ev) {
|
||||||
// Hide redacted events
|
// Hide redacted events
|
||||||
if (ev.isRedacted() && !isEnabled('showRedactions')) return true;
|
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")) return true;
|
if (ev.isRelation("m.replace") && SettingsStore.isFeatureEnabled("feature_message_editing")) return true;
|
||||||
|
|
||||||
const eventDiff = memberEventDiff(ev);
|
const eventDiff = memberEventDiff(ev);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue