diff --git a/src/UserSettingsStore.js b/src/UserSettingsStore.js index 009fdabb53..fef84468ec 100644 --- a/src/UserSettingsStore.js +++ b/src/UserSettingsStore.js @@ -25,11 +25,6 @@ import { _t } from './languageHandler'; export default { LABS_FEATURES: [ - { - name: "-", - id: 'rich_text_editor', - default: false, - }, { name: "-", id: 'matrix_apps', @@ -39,8 +34,7 @@ export default { // horrible but it works. The locality makes this somewhat more palatable. doTranslations: function() { - this.LABS_FEATURES[0].name = _t("New Composer & Autocomplete"); - this.LABS_FEATURES[1].name = _t("Matrix Apps"); + this.LABS_FEATURES[0].name = _t("Matrix Apps"); }, loadProfileInfo: function() { diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 27d5e11119..c623c88312 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -226,21 +226,6 @@ export default class MessageComposer extends React.Component { this.setState({inputState}); } - onUpArrow() { - return this.refs.autocomplete.onUpArrow(); - } - - onDownArrow() { - return this.refs.autocomplete.onDownArrow(); - } - - _tryComplete(): boolean { - if (this.refs.autocomplete) { - return this.refs.autocomplete.onCompletionClicked(); - } - return false; - } - _onAutocompleteConfirm(range, completion) { if (this.messageComposerInput) { this.messageComposerInput.setDisplayedCompletion(range, completion); @@ -267,8 +252,7 @@ export default class MessageComposer extends React.Component { const uploadInputStyle = {display: 'none'}; const MemberAvatar = sdk.getComponent('avatars.MemberAvatar'); const TintableSvg = sdk.getComponent("elements.TintableSvg"); - const MessageComposerInput = sdk.getComponent("rooms.MessageComposerInput" + - (UserSettingsStore.isFeatureEnabled('rich_text_editor') ? "" : "Old")); + const MessageComposerInput = sdk.getComponent("rooms.MessageComposerInput"); const controls = []; @@ -351,8 +335,7 @@ export default class MessageComposer extends React.Component { title={_t("Show Text Formatting Toolbar")} src="img/button-text-formatting.svg" onClick={this.onToggleFormattingClicked} - style={{visibility: this.state.showFormatting || - !UserSettingsStore.isFeatureEnabled('rich_text_editor') ? 'hidden' : 'visible'}} + style={{visibility: this.state.showFormatting ? 'hidden' : 'visible'}} key="controls_formatting" /> ); @@ -367,10 +350,7 @@ export default class MessageComposer extends React.Component { room={this.props.room} placeholder={placeholderText} tryComplete={this._tryComplete} - onUpArrow={this.onUpArrow} - onDownArrow={this.onDownArrow} onFilesPasted={this.uploadFiles} - tabComplete={this.props.tabComplete} // used for old messagecomposerinput/tabcomplete onContentChanged={this.onInputContentChanged} onInputStateChanged={this.onInputStateChanged} />, formattingButton, @@ -389,18 +369,6 @@ export default class MessageComposer extends React.Component { ); } - let autoComplete; - if (UserSettingsStore.isFeatureEnabled('rich_text_editor')) { - autoComplete =