Skip to content

Commit

Permalink
Ability to share communities (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahmo authored Jan 15, 2024
1 parent 0a18529 commit de9d335
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/feed/widgets/feed_page_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:lemmy_api_client/v3.dart';
import 'package:share_plus/share_plus.dart';
import 'package:thunder/account/bloc/account_bloc.dart';

import 'package:thunder/community/bloc/anonymous_subscriptions_bloc.dart';
Expand Down Expand Up @@ -141,6 +142,16 @@ class FeedPageAppBar extends StatelessWidget {
title: Text(_getFavoriteStatus(context) ? l10n.removeFromFavorites : l10n.addToFavorites),
),
),
if (feedBloc.state.fullCommunityView?.communityView.community.actorId != null)
PopupMenuItem(
onTap: () => Share.share(feedBloc.state.fullCommunityView!.communityView.community.actorId),
child: ListTile(
dense: true,
horizontalTitleGap: 5,
leading: const Icon(Icons.share_rounded, size: 20),
title: Text(l10n.share),
),
),
],
),
]
Expand Down

0 comments on commit de9d335

Please sign in to comment.