From 90c78c7fc0949ffca56d93774d34a6949ee55c0f Mon Sep 17 00:00:00 2001 From: Micah Morrison Date: Tue, 6 Aug 2024 12:47:28 -0400 Subject: [PATCH] Fix share text post (#1514) --- lib/community/utils/post_card_action_helpers.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/community/utils/post_card_action_helpers.dart b/lib/community/utils/post_card_action_helpers.dart index ba219248a..228c55e7b 100644 --- a/lib/community/utils/post_card_action_helpers.dart +++ b/lib/community/utils/post_card_action_helpers.dart @@ -13,6 +13,7 @@ import 'package:thunder/community/bloc/community_bloc.dart'; import 'package:thunder/community/enums/community_action.dart'; import 'package:thunder/community/widgets/post_card_metadata.dart'; import 'package:thunder/core/enums/full_name.dart'; +import 'package:thunder/core/enums/media_type.dart'; import 'package:thunder/core/models/post_view_media.dart'; import 'package:thunder/core/singletons/lemmy_client.dart'; import 'package:thunder/feed/bloc/feed_bloc.dart'; @@ -398,7 +399,10 @@ void showPostActionBottomModalSheet( // Remove the share link option if there is no link // Or if the media link is the same as the external link - if (postViewMedia.media.isEmpty || postViewMedia.media.first.originalUrl == postViewMedia.media.first.imageUrl || postViewMedia.media.first.originalUrl == postViewMedia.media.first.mediaUrl) { + if (postViewMedia.media.isEmpty || + postViewMedia.media.first.mediaType == MediaType.text || + postViewMedia.media.first.originalUrl == postViewMedia.media.first.imageUrl || + postViewMedia.media.first.originalUrl == postViewMedia.media.first.mediaUrl) { sharePostCardActions.removeWhere((extendedAction) => extendedAction.postCardAction == PostCardAction.shareLink); }