From 44ba785242c14bdfcd95854683a69a8451288dba Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Wed, 23 Aug 2023 15:40:31 +0200 Subject: [PATCH] Change the hashtag bar to be hidden when there is a CW and the post is not expanded (#26615) --- app/javascript/mastodon/components/status.jsx | 5 +++-- .../mastodon/features/status/components/detailed_status.jsx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 45a2106db..30692d1cd 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -546,6 +546,7 @@ class Status extends ImmutablePureComponent { const visibilityIcon = visibilityIconInfo[status.get('visibility')]; const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); + const expanded = !status.get('hidden') return ( @@ -574,7 +575,7 @@ class Status extends ImmutablePureComponent { diff --git a/app/javascript/mastodon/features/status/components/detailed_status.jsx b/app/javascript/mastodon/features/status/components/detailed_status.jsx index 401550e49..e41a042c7 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.jsx +++ b/app/javascript/mastodon/features/status/components/detailed_status.jsx @@ -293,6 +293,7 @@ class DetailedStatus extends ImmutablePureComponent { } const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); + const expanded = !status.get('hidden') return (
@@ -318,7 +319,7 @@ class DetailedStatus extends ImmutablePureComponent { {media} - {hashtagBar} + {expanded && hashtagBar}