rename ComposerHistoryManager to SendHistoryManager to avoid confusion

...with the undo history manager for the composer.
This commit is contained in:
Bruno Windels 2019-08-21 15:34:49 +02:00
parent c5cd8b943a
commit 3c5cf3e778
2 changed files with 3 additions and 4 deletions

View file

@ -17,7 +17,7 @@ limitations under the License.
import _clamp from 'lodash/clamp'; import _clamp from 'lodash/clamp';
export default class ComposerHistoryManager { export default class SendHistoryManager {
history: Array<HistoryItem> = []; history: Array<HistoryItem> = [];
prefix: string; prefix: string;
lastIndex: number = 0; // used for indexing the storage lastIndex: number = 0; // used for indexing the storage

View file

@ -18,7 +18,6 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import dis from '../../../dispatcher'; import dis from '../../../dispatcher';
import EditorModel from '../../../editor/model'; import EditorModel from '../../../editor/model';
import {getCaretOffsetAndText} from '../../../editor/dom';
import {htmlSerializeIfNeeded, textSerialize, containsEmote, stripEmoteCommand} from '../../../editor/serialize'; import {htmlSerializeIfNeeded, textSerialize, containsEmote, stripEmoteCommand} from '../../../editor/serialize';
import {CommandPartCreator} from '../../../editor/parts'; import {CommandPartCreator} from '../../../editor/parts';
import {MatrixClient} from 'matrix-js-sdk'; import {MatrixClient} from 'matrix-js-sdk';
@ -28,7 +27,7 @@ import RoomViewStore from '../../../stores/RoomViewStore';
import ReplyThread from "../elements/ReplyThread"; import ReplyThread from "../elements/ReplyThread";
import {parseEvent} from '../../../editor/deserialize'; import {parseEvent} from '../../../editor/deserialize';
import {findEditableEvent} from '../../../utils/EventUtils'; import {findEditableEvent} from '../../../utils/EventUtils';
import ComposerHistoryManager from "../../../ComposerHistoryManager"; import SendHistoryManager from "../../../SendHistoryManager";
import {processCommandInput} from '../../../SlashCommands'; import {processCommandInput} from '../../../SlashCommands';
import sdk from '../../../index'; import sdk from '../../../index';
import Modal from '../../../Modal'; import Modal from '../../../Modal';
@ -234,7 +233,7 @@ export default class SendMessageComposer extends React.Component {
const partCreator = new CommandPartCreator(this.props.room, this.context.matrixClient); const partCreator = new CommandPartCreator(this.props.room, this.context.matrixClient);
this.model = new EditorModel([], partCreator); this.model = new EditorModel([], partCreator);
this.dispatcherRef = dis.register(this.onAction); this.dispatcherRef = dis.register(this.onAction);
this.sendHistoryManager = new ComposerHistoryManager(this.props.room.roomId, 'mx_slate_composer_history_'); this.sendHistoryManager = new SendHistoryManager(this.props.room.roomId, 'mx_slate_composer_history_');
} }
onAction = (payload) => { onAction = (payload) => {