mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
feature flag for displaying edits as well
This commit is contained in:
parent
50315557ba
commit
5fa3f70fb4
@ -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(
|
||||
<li key={eventId}
|
||||
@ -585,7 +586,7 @@ module.exports = React.createClass({
|
||||
<EventTile mxEvent={mxEv}
|
||||
continuation={continuation}
|
||||
isRedacted={mxEv.isRedacted()}
|
||||
replacingEventId={mxEv.replacingEventId()}
|
||||
replacingEventId={editingEnabled && mxEv.replacingEventId()}
|
||||
editState={isEditing && this.props.editState}
|
||||
onHeightChanged={this._onHeightChanged}
|
||||
readReceipts={readReceipts}
|
||||
|
@ -829,7 +829,7 @@ module.exports.haveTileForEvent = function(e) {
|
||||
if (e.isRedacted() && !isMessageEvent(e)) return false;
|
||||
|
||||
// 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);
|
||||
if (handler === undefined) return false;
|
||||
|
@ -47,7 +47,7 @@ export default function shouldHideEvent(ev) {
|
||||
if (ev.isRedacted() && !isEnabled('showRedactions')) return true;
|
||||
|
||||
// Hide replacement events since they update the original tile
|
||||
if (ev.isRelation("m.replace")) return true;
|
||||
if (ev.isRelation("m.replace") && SettingsStore.isFeatureEnabled("feature_message_editing")) return true;
|
||||
|
||||
const eventDiff = memberEventDiff(ev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user