From 99889ea57d04646d593dc5e9d0b1c8fe97856874 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Wed, 28 Jun 2017 23:20:47 -0700 Subject: [PATCH] Tiny Status improvements - Media toots are no longer auto-collapsed if the media is behind a CW - Display names no longer appear clickable when a toot is collapsed - Fixed #36 by adding reduplicating the media icon inside the SHOW MORE/LESS --- app/javascript/mastodon/components/status.js | 12 ++++++------ app/javascript/mastodon/components/status_content.js | 7 +++++-- app/javascript/styles/components.scss | 4 ++++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 33e4a25e4f..a200570a15 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -176,7 +176,7 @@ class Status extends ImmutablePureComponent { else if (settings.getIn(['collapsed', 'auto', 'all'])) this.collapse(); else if (settings.getIn(['collapsed', 'auto', 'lengthy']) && node.clientHeight > 400) this.collapse(); else if (settings.getIn(['collapsed', 'auto', 'replies']) && status.get('in_reply_to_id', null) !== null) this.collapse(); - else if (settings.getIn(['collapsed', 'auto', 'media']) && status.get('media_attachments').size > 0) this.collapse(); + else if (settings.getIn(['collapsed', 'auto', 'media']) && !(status.get('spoiler_text').length > 0) && status.get('media_attachments').size > 0) this.collapse(); if (!this.props.intersectionObserverWrapper) { // TODO: enable IntersectionObserver optimization for notification statuses. @@ -268,7 +268,7 @@ class Status extends ImmutablePureComponent { render () { let media = null; - let mediaType = null; + let mediaIcon = null; let statusAvatar; // Exclude intersectionObserverWrapper from `other` variable @@ -297,10 +297,10 @@ class Status extends ImmutablePureComponent { } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { media = ; - mediaType =