From 02236332bab7c5cc4ddf4a3a778fd956f6851322 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 7 Feb 2020 13:21:25 +0100 Subject: [PATCH] Fix native share button not being displayed for unlisted toots (#13045) --- app/javascript/mastodon/components/status_action_bar.js | 2 +- .../mastodon/features/status/components/action_bar.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index 4b3c79d0da..e2c8d43c98 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -319,7 +319,7 @@ class StatusActionBar extends ImmutablePureComponent { replyTitle = intl.formatMessage(messages.replyAll); } - const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && ( + const shareButton = ('share' in navigator) && publicStatus && ( ); diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js index 657d2bb1c5..959774da46 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.js +++ b/app/javascript/mastodon/features/status/components/action_bar.js @@ -250,7 +250,7 @@ class ActionBar extends React.PureComponent { } } - const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && ( + const shareButton = ('share' in navigator) && publicStatus && (
); @@ -265,12 +265,10 @@ class ActionBar extends React.PureComponent { if (status.get('visibility') === 'direct') reblogIcon = 'envelope'; else if (status.get('visibility') === 'private') reblogIcon = 'lock'; - let reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private'); - return (
-
+
{shareButton}