From 9349f1067a99c45648dc66f397b338d458d1a763 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 871fab2dc..549de95fc 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -234,46 +234,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') && } +
+ ); } }