Implement reply chain fallback for threads backwards compatibility (#7565)
This commit is contained in:
parent
a00d359422
commit
41b9e4aa4f
6 changed files with 87 additions and 40 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
|
||||
import React, { createRef } from 'react';
|
||||
import classNames from "classnames";
|
||||
import { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
import { EventType, MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
|
||||
import { EventStatus, MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||
import { Relations } from "matrix-js-sdk/src/models/relations";
|
||||
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
|
@ -1330,7 +1330,12 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
msgOption = readAvatars;
|
||||
}
|
||||
|
||||
const replyChain = haveTileForEvent(this.props.mxEvent) && ReplyChain.hasReply(this.props.mxEvent)
|
||||
const renderTarget = this.props.tileShape === TileShape.Thread
|
||||
? RelationType.Thread
|
||||
: undefined;
|
||||
|
||||
const replyChain = haveTileForEvent(this.props.mxEvent)
|
||||
&& ReplyChain.shouldDisplayReply(this.props.mxEvent, renderTarget)
|
||||
? <ReplyChain
|
||||
parentEv={this.props.mxEvent}
|
||||
onHeightChanged={this.props.onHeightChanged}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue