From b7008b2cd5f40a14b52ea2dff05d263ada041b5a 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 2dae01ff256a183fda0efa828f9289f01950c785 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 60b3706221..0a481c816e 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 d71a3ae081..bb53f9288a 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}