From 4d95af705d977457d5e3337e817e1c2c1c2ca15c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 26 Feb 2019 10:26:33 +0100 Subject: [PATCH] fix lint --- src/components/views/rooms/EventTile.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 4411067f2e..804789f306 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -700,6 +700,15 @@ module.exports = withMatrixClient(React.createClass({ case 'reply': 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 (
{ avatar } @@ -709,10 +718,7 @@ module.exports = withMatrixClient(React.createClass({ { timestamp } { this._renderE2EPadlock() } - { - this.props.tileShape === 'reply_preview' - && ReplyThread.makeThread(this.props.mxEvent, this.props.onWidgetLoad, this.props.permalinkCreator, 'replyThread') - } + { thread }
@@ -735,7 +747,7 @@ module.exports = withMatrixClient(React.createClass({ { timestamp } { this._renderE2EPadlock() } - { ReplyThread.makeThread(this.props.mxEvent, this.props.onWidgetLoad, this.props.permalinkCreator, 'replyThread') } + { thread }