pull/21833/head
Bruno Windels 2019-02-26 10:26:33 +01:00
parent 77f979ed6d
commit 4d95af705d
1 changed files with 17 additions and 5 deletions

View File

@ -700,6 +700,15 @@ module.exports = withMatrixClient(React.createClass({
case 'reply': case 'reply':
case 'reply_preview': { case 'reply_preview': {
let thread;
if (this.props.tileShape === 'reply_preview') {
thread = ReplyThread.makeThread(
this.props.mxEvent,
this.props.onWidgetLoad,
this.props.permalinkCreator,
'replyThread',
);
}
return ( return (
<div className={classes}> <div className={classes}>
{ avatar } { avatar }
@ -709,10 +718,7 @@ module.exports = withMatrixClient(React.createClass({
{ timestamp } { timestamp }
</a> </a>
{ this._renderE2EPadlock() } { this._renderE2EPadlock() }
{ { thread }
this.props.tileShape === 'reply_preview'
&& ReplyThread.makeThread(this.props.mxEvent, this.props.onWidgetLoad, this.props.permalinkCreator, 'replyThread')
}
<EventTileType ref="tile" <EventTileType ref="tile"
mxEvent={this.props.mxEvent} mxEvent={this.props.mxEvent}
highlights={this.props.highlights} highlights={this.props.highlights}
@ -724,6 +730,12 @@ module.exports = withMatrixClient(React.createClass({
); );
} }
default: { default: {
const thread = ReplyThread.makeThread(
this.props.mxEvent,
this.props.onWidgetLoad,
this.props.permalinkCreator,
'replyThread',
);
return ( return (
<div className={classes}> <div className={classes}>
<div className="mx_EventTile_msgOption"> <div className="mx_EventTile_msgOption">
@ -735,7 +747,7 @@ module.exports = withMatrixClient(React.createClass({
{ timestamp } { timestamp }
</a> </a>
{ this._renderE2EPadlock() } { this._renderE2EPadlock() }
{ ReplyThread.makeThread(this.props.mxEvent, this.props.onWidgetLoad, this.props.permalinkCreator, 'replyThread') } { thread }
<EventTileType ref="tile" <EventTileType ref="tile"
mxEvent={this.props.mxEvent} mxEvent={this.props.mxEvent}
highlights={this.props.highlights} highlights={this.props.highlights}