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 45a2106dba62033c9af7084d9198321c48ee38df..30692d1cd970cba26fa1ef924926ca3f7acfdd99 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 401550e49f22f68971d6273083ea76ad9159facd..e41a042c7c0beb4d7743fca2a1bbdf401f54e33e 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}