feat(blackList): Issue-523

This commit is contained in:
mso7nueh
2025-06-30 14:27:10 +03:00
parent 693260afb6
commit d4a05f47d1
24 changed files with 313 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.da
import 'package:eatvio_app/features/complaining/presentation/complaining_bottom_sheet.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/features/feed/presentation/widgets/plan_widget.dart';
import 'package:eatvio_app/features/menu/presentation/blocked_user_cubit/blocked_users_cubit.dart';
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
import 'package:eatvio_app/features/profile/models/weight_model.dart';
import 'package:eatvio_app/features/profile/presentation/bloc/plans_cubit/plans_cubit.dart';
@@ -1175,6 +1176,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
),
);
} else if (value == 'block') {
sl<BlockedUsersCubit>().blockUser(state.profile.slug);
} else {
showModalBottomSheet(
context: context,
@@ -1196,6 +1199,11 @@ class _ProfileScreenState extends State<ProfileScreen> {
value: 'complain',
child: Text('Пожаловаться'),
),
if (widget.author != null)
const PopupMenuItem(
value: 'block',
child: Text('Заблокировать'),
),
],
child: const Icon(Icons.more_horiz_rounded),
),

View File

@@ -102,6 +102,7 @@ class _ProfileBlogPostWidgetState extends State<ProfileBlogPostWidget> {
path: 'blog_post/${(state.blogPosts[widget.index].id)}',
id: state.blogPosts[widget.index].id,
feedBlogPostModel: state.blogPosts[widget.index],
userSlug: state.blogPosts[widget.index].author.authorSlug,
),
],
),