Fix lint and style issues
parent
12387b4978
commit
ac7963b509
|
@ -38,13 +38,12 @@ import * as sdk from '../../../index';
|
||||||
import Modal from '../../../Modal';
|
import Modal from '../../../Modal';
|
||||||
import {_t, _td} from '../../../languageHandler';
|
import {_t, _td} from '../../../languageHandler';
|
||||||
import ContentMessages from '../../../ContentMessages';
|
import ContentMessages from '../../../ContentMessages';
|
||||||
import {Key, isOnlyCtrlOrCmdKeyEvent} from "../../../Keyboard";
|
import {Key} from "../../../Keyboard";
|
||||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
import RateLimitedFunc from '../../../ratelimitedfunc';
|
import RateLimitedFunc from '../../../ratelimitedfunc';
|
||||||
import {Action} from "../../../dispatcher/actions";
|
import {Action} from "../../../dispatcher/actions";
|
||||||
import {containsEmoji} from "../../../effects/utils";
|
import {containsEmoji} from "../../../effects/utils";
|
||||||
import {CHAT_EFFECTS} from '../../../effects';
|
import {CHAT_EFFECTS} from '../../../effects';
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
|
||||||
import CountlyAnalytics from "../../../CountlyAnalytics";
|
import CountlyAnalytics from "../../../CountlyAnalytics";
|
||||||
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||||
import EMOJI_REGEX from 'emojibase-regex';
|
import EMOJI_REGEX from 'emojibase-regex';
|
||||||
|
@ -152,7 +151,7 @@ export default class SendMessageComposer extends React.Component {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
break;
|
break;
|
||||||
case KeyAction.SelectPrevSendHistory:
|
case KeyAction.SelectPrevSendHistory:
|
||||||
case KeyAction.SelectNextSendHistory:
|
case KeyAction.SelectNextSendHistory: {
|
||||||
// Try select composer history
|
// Try select composer history
|
||||||
const selected = this.selectSendHistory(action === KeyAction.SelectPrevSendHistory);
|
const selected = this.selectSendHistory(action === KeyAction.SelectPrevSendHistory);
|
||||||
if (selected) {
|
if (selected) {
|
||||||
|
@ -160,7 +159,8 @@ export default class SendMessageComposer extends React.Component {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KeyAction.EditLastMessage:
|
}
|
||||||
|
case KeyAction.EditPrevMessage:
|
||||||
// selection must be collapsed and caret at start
|
// selection must be collapsed and caret at start
|
||||||
if (this._editorRef.isSelectionCollapsed() && this._editorRef.isCaretAtStart()) {
|
if (this._editorRef.isSelectionCollapsed() && this._editorRef.isCaretAtStart()) {
|
||||||
const editEvent = findEditableEvent(this.props.room, false);
|
const editEvent = findEditableEvent(this.props.room, false);
|
||||||
|
|
Loading…
Reference in New Issue