From c8bf30df9240bc067289dae64c09f017fc3de039 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 28 Jul 2019 13:48:05 +0200 Subject: [PATCH] Fix animate on hover in poll options without CW (#11404) --- .../mastodon/components/status_content.js | 49 +++++-------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js index 8a05415af..61268dc91 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -233,46 +233,23 @@ export default class StatusContent extends React.PureComponent { ); } else if (this.props.onClick) { - const output = [ -
, - ]; + return ( +
+
- if (this.state.collapsed) { - output.push(readMoreButton); - } + {!!this.state.collapsed && readMoreButton} - if (status.get('poll')) { - output.push(); - } - - return output; + {!!status.get('poll') && } +
+ ); } else { - const output = [ -
, - ]; + return ( +
+
- if (status.get('poll')) { - output.push(); - } - - return output; + {!!status.get('poll') && } +
+ ); } }