From e443874024e908694395aae71a7df4ec557be70f Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 7 Feb 2020 13:21:25 +0100 Subject: [PATCH] [Glitch] Fix native share button not being displayed for unlisted toots Port 02236332bab7c5cc4ddf4a3a778fd956f6851322 to glitch-soc Signed-off-by: Thibaut Girka --- .../flavours/glitch/components/status_action_bar.js | 2 +- .../flavours/glitch/features/status/components/action_bar.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index 60b37062210..0a481c816e8 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -265,7 +265,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/flavours/glitch/features/status/components/action_bar.js b/app/javascript/flavours/glitch/features/status/components/action_bar.js index d71a3ae0817..bb53f9288a3 100644 --- a/app/javascript/flavours/glitch/features/status/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/status/components/action_bar.js @@ -188,7 +188,7 @@ class ActionBar extends React.PureComponent { } } - const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && ( + const shareButton = ('share' in navigator) && publicStatus && (
); @@ -196,13 +196,12 @@ 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' && me !== status.getIn(['account', 'id']))); let reblog_message = status.get('visibility') === 'private' ? messages.reblog_private : messages.reblog; return (
-
+
{shareButton}