Rename ReplyThread to ReplyChain to avoid confusion with m.thread
This commit is contained in:
parent
4fb0d021ae
commit
5a7c0d87b6
15 changed files with 77 additions and 77 deletions
|
@ -23,7 +23,7 @@ import { Relations } from "matrix-js-sdk/src/models/relations";
|
|||
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
import { Thread, ThreadEvent } from 'matrix-js-sdk/src/models/thread';
|
||||
|
||||
import ReplyThread from "../elements/ReplyThread";
|
||||
import ReplyChain from "../elements/ReplyChain";
|
||||
import { _t } from '../../../languageHandler';
|
||||
import { hasText } from "../../../TextForEvent";
|
||||
import * as sdk from "../../../index";
|
||||
|
@ -337,7 +337,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
private isListeningForReceipts: boolean;
|
||||
// TODO: Types
|
||||
private tile = React.createRef<unknown>();
|
||||
private replyThread = React.createRef<ReplyThread>();
|
||||
private replyThread = React.createRef<ReplyChain>();
|
||||
|
||||
public readonly ref = createRef<HTMLElement>();
|
||||
|
||||
|
@ -931,7 +931,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
// TODO: Types
|
||||
getTile: () => any | null = () => this.tile.current;
|
||||
|
||||
getReplyThread = () => this.replyThread.current;
|
||||
getReplyChain = () => this.replyThread.current;
|
||||
|
||||
getReactions = () => {
|
||||
if (
|
||||
|
@ -1100,7 +1100,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
reactions={this.state.reactions}
|
||||
permalinkCreator={this.props.permalinkCreator}
|
||||
getTile={this.getTile}
|
||||
getReplyThread={this.getReplyThread}
|
||||
getReplyChain={this.getReplyChain}
|
||||
onFocusChange={this.onActionBarFocusChange}
|
||||
isQuoteExpanded={isQuoteExpanded}
|
||||
toggleThreadExpanded={() => this.setQuoteExpanded(!isQuoteExpanded)}
|
||||
|
@ -1281,8 +1281,8 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
|
||||
default: {
|
||||
const thread = haveTileForEvent(this.props.mxEvent) &&
|
||||
ReplyThread.hasThreadReply(this.props.mxEvent) ? (
|
||||
<ReplyThread
|
||||
ReplyChain.hasReply(this.props.mxEvent) ? (
|
||||
<ReplyChain
|
||||
parentEv={this.props.mxEvent}
|
||||
onHeightChanged={this.props.onHeightChanged}
|
||||
ref={this.replyThread}
|
||||
|
|
|
@ -34,7 +34,7 @@ import {
|
|||
} from '../../../editor/serialize';
|
||||
import BasicMessageComposer, { REGEX_EMOTICON } from "./BasicMessageComposer";
|
||||
import { CommandPartCreator, Part, PartCreator, SerializedPart, Type } from '../../../editor/parts';
|
||||
import ReplyThread from "../elements/ReplyThread";
|
||||
import ReplyChain from "../elements/ReplyChain";
|
||||
import { findEditableEvent } from '../../../utils/EventUtils';
|
||||
import SendHistoryManager from "../../../SendHistoryManager";
|
||||
import { Command, CommandCategories, getCommand } from '../../../SlashCommands';
|
||||
|
@ -64,12 +64,12 @@ function addReplyToMessageContent(
|
|||
permalinkCreator: RoomPermalinkCreator,
|
||||
relation?: IEventRelation,
|
||||
): void {
|
||||
const replyContent = ReplyThread.makeReplyMixIn(replyToEvent);
|
||||
const replyContent = ReplyChain.makeReplyMixIn(replyToEvent);
|
||||
Object.assign(content, replyContent);
|
||||
|
||||
// Part of Replies fallback support - prepend the text we're sending
|
||||
// with the text we're replying to
|
||||
const nestedReply = ReplyThread.getNestedReplyText(replyToEvent, permalinkCreator);
|
||||
const nestedReply = ReplyChain.getNestedReplyText(replyToEvent, permalinkCreator);
|
||||
if (nestedReply) {
|
||||
if (content.formatted_body) {
|
||||
content.formatted_body = nestedReply.html + content.formatted_body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue