Merge branches 'develop' and 't3chguy/hide_empty_sublist' of github.com:matrix-org/matrix-react-sdk into t3chguy/hide_empty_sublist
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> # Conflicts: # src/i18n/strings/en_EN.json
This commit is contained in:
commit
f5519c21b9
22 changed files with 294 additions and 435 deletions
|
@ -621,13 +621,14 @@ module.exports = withMatrixClient(React.createClass({
|
|||
|
||||
switch (this.props.tileShape) {
|
||||
case 'notif': {
|
||||
const EmojiText = sdk.getComponent('elements.EmojiText');
|
||||
const room = this.props.matrixClient.getRoom(this.props.mxEvent.getRoomId());
|
||||
return (
|
||||
<div className={classes}>
|
||||
<div className="mx_EventTile_roomName">
|
||||
<a href={permalink} onClick={this.onPermalinkClicked}>
|
||||
<EmojiText element="a" href={permalink} onClick={this.onPermalinkClicked}>
|
||||
{ room ? room.name : '' }
|
||||
</a>
|
||||
</EmojiText>
|
||||
</div>
|
||||
<div className="mx_EventTile_senderDetails">
|
||||
{ avatar }
|
||||
|
|
|
@ -157,6 +157,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
this.setDisplayedCompletion = this.setDisplayedCompletion.bind(this);
|
||||
this.onMarkdownToggleClicked = this.onMarkdownToggleClicked.bind(this);
|
||||
this.onTextPasted = this.onTextPasted.bind(this);
|
||||
this.focusComposer = this.focusComposer.bind(this);
|
||||
|
||||
const isRichtextEnabled = SettingsStore.getValue('MessageComposerInput.isRichTextEnabled');
|
||||
|
||||
|
@ -270,13 +271,12 @@ export default class MessageComposerInput extends React.Component {
|
|||
}
|
||||
|
||||
onAction = (payload) => {
|
||||
const editor = this.refs.editor;
|
||||
let contentState = this.state.editorState.getCurrentContent();
|
||||
|
||||
switch (payload.action) {
|
||||
case 'reply_to_event':
|
||||
case 'focus_composer':
|
||||
editor.focus();
|
||||
this.focusComposer();
|
||||
break;
|
||||
case 'insert_mention': {
|
||||
// Pretend that we've autocompleted this user because keeping two code
|
||||
|
@ -319,7 +319,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
let editorState = EditorState.push(this.state.editorState, contentState, 'insert-characters');
|
||||
editorState = EditorState.moveSelectionToEnd(editorState);
|
||||
this.onEditorContentChanged(editorState);
|
||||
editor.focus();
|
||||
this.focusComposer();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1155,6 +1155,10 @@ export default class MessageComposerInput extends React.Component {
|
|||
this.handleKeyCommand('toggle-mode');
|
||||
};
|
||||
|
||||
focusComposer() {
|
||||
this.refs.editor.focus();
|
||||
}
|
||||
|
||||
render() {
|
||||
const activeEditorState = this.state.originalEditorState || this.state.editorState;
|
||||
|
||||
|
@ -1179,7 +1183,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
activeEditorState.getCurrentContent().getBlocksAsArray());
|
||||
|
||||
return (
|
||||
<div className="mx_MessageComposer_input_wrapper">
|
||||
<div className="mx_MessageComposer_input_wrapper" onClick={this.focusComposer}>
|
||||
<div className="mx_MessageComposer_autocomplete_wrapper">
|
||||
<ReplyPreview />
|
||||
<Autocomplete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue