diff options
author | kibi! <marrus-sh@users.noreply.github.com> | 2018-01-14 13:29:51 -0800 |
---|---|---|
committer | kibi! <marrus-sh@users.noreply.github.com> | 2018-01-14 13:29:51 -0800 |
commit | a5931e1f48f053a213c2c6c39dcc090a7d55bf95 (patch) | |
tree | 7243b318e872f8fe7ad760b3f8f0b2775006662d /app/javascript | |
parent | 9526aababc3232e4e10d4c7cbb6e357a4b3e5431 (diff) |
Fixed autocollapse detection
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/components/status.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index b8a0fd180..4feb9180b 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -121,15 +121,15 @@ export default class Status extends ImmutablePureComponent { if (function () { switch (true) { - case collapse: - case autoCollapseSettings.get('all'): - case autoCollapseSettings.get('notifications') && muted: + case !!collapse: + case !!autoCollapseSettings.get('all'): + case autoCollapseSettings.get('notifications') && !!muted: case autoCollapseSettings.get('lengthy') && node.clientHeight > ( status.get('media_attachments').size && !muted ? 650 : 400 ): case autoCollapseSettings.get('reblogs') && prepend === 'reblogged_by': case autoCollapseSettings.get('replies') && status.get('in_reply_to_id', null) !== null: - case autoCollapseSettings.get('media') && !(status.get('spoiler_text').length) && status.get('media_attachments').size: + case autoCollapseSettings.get('media') && !(status.get('spoiler_text').length) && !!status.get('media_attachments').size: return true; default: return false; |