Remove editing feature flag

Part of https://github.com/vector-im/riot-web/issues/10282
This commit is contained in:
J. Ryan Stinnett 2019-07-17 16:56:15 +01:00
parent b8aae63c83
commit 674f33917f
8 changed files with 7 additions and 23 deletions

View file

@ -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({
<EventTile mxEvent={mxEv}
continuation={continuation}
isRedacted={mxEv.isRedacted()}
replacingEventId={this._editingEnabled && mxEv.replacingEventId()}
replacingEventId={mxEv.replacingEventId()}
editState={isEditing && this.props.editState}
onHeightChanged={this._onHeightChanged}
readReceipts={readReceipts}

View file

@ -127,10 +127,6 @@ export default class MessageActionBar extends React.PureComponent {
return SettingsStore.isFeatureEnabled("feature_reactions");
}
isEditingEnabled() {
return SettingsStore.isFeatureEnabled("feature_message_editing");
}
renderReactButton() {
if (!this.isReactionsEnabled()) {
return null;
@ -158,7 +154,7 @@ export default class MessageActionBar extends React.PureComponent {
onClick={this.onReplyClick}
/>;
}
if (this.isEditingEnabled() && canEditContent(this.props.mxEvent)) {
if (canEditContent(this.props.mxEvent)) {
editButton = <span className="mx_MessageActionBar_maskButton mx_MessageActionBar_editButton"
title={_t("Edit")}
onClick={this.onEditClick}

View file

@ -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") && SettingsStore.isFeatureEnabled("feature_message_editing")) return false;
if (e.isRelation("m.replace")) return false;
const handler = getHandlerTile(e);
if (handler === undefined) return false;

View file

@ -1141,9 +1141,8 @@ export default class MessageComposerInput extends React.Component {
if (!selection.anchor.isAtEndOfNode(document)) return;
}
const editingEnabled = SettingsStore.isFeatureEnabled("feature_message_editing");
const shouldSelectHistory = (editingEnabled && e.altKey) || !editingEnabled;
const shouldEditLastMessage = editingEnabled && !e.altKey && up && !RoomViewStore.getQuotingEvent();
const shouldSelectHistory = e.altKey;
const shouldEditLastMessage = !e.altKey && up && !RoomViewStore.getQuotingEvent();
if (shouldSelectHistory) {
// Try select composer history