diff --git a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart index 10afdd8c..18f2a878 100644 --- a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart +++ b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart @@ -1,12 +1,13 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:dismissible_page/dismissible_page.dart'; import 'package:eatvio_app/core/const.dart'; +import 'package:eatvio_app/core/enums/complained_content.dart'; import 'package:eatvio_app/core/utils/date_time_utils.dart'; +import 'package:eatvio_app/core/widgets/custom_popup.dart'; import 'package:eatvio_app/core/widgets/feed_icon_button.dart'; import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; -import 'package:eatvio_app/features/feed/presentation/widgets/subscribe_button_widget.dart'; import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_cubit.dart'; import 'package:eatvio_app/features/profile/presentation/bloc/profile_cubit/profile_state.dart'; import 'package:flutter/material.dart'; @@ -93,26 +94,33 @@ class _ProfileBlogPostWidgetState extends State { ], ), const Spacer(), - if (!state.blogPosts[widget.index].author.isEntitySubscribedByMe! && !state.blogPosts[widget.index].author.authorIsMe) - SubscribeButtonWidget( - slug: state.blogPosts[widget.index].author.authorSlug, - ), + CustomPopup( + isAuthor: state.blogPosts[widget.index].author.authorIsMe, + complainedContentType: ComplainedContent.posts, + path: 'blog_post/${(state.blogPosts[widget.index].id)}', + id: state.blogPosts[widget.index].id, + feedBlogPostModel: state.blogPosts[widget.index], + ), ], ), ), - if (state.blogPosts[widget.index].title.isNotEmpty || state.blogPosts[widget.index].description.isNotEmpty) const SizedBox(height: 12), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 12), - child: Text( - state.blogPosts[widget.index].title, - style: const TextStyle( - fontWeight: FontWeight.w600, - fontSize: 18, - color: Colors.black87, + if (state.blogPosts[widget.index].title.isNotEmpty) ...[ + const SizedBox(height: 12), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12), + child: Text( + state.blogPosts[widget.index].title, + style: const TextStyle( + fontWeight: FontWeight.w600, + fontSize: 18, + color: Colors.black87, + ), ), ), - ), - if (state.blogPosts[widget.index].title.isNotEmpty && state.blogPosts[widget.index].description.isNotEmpty) const SizedBox(height: 8), + ], + if (state.blogPosts[widget.index].title.isEmpty) const SizedBox(height: 8), + if (state.blogPosts[widget.index].title.isNotEmpty && state.blogPosts[widget.index].description.isNotEmpty) + const SizedBox(height: 8), if (state.blogPosts[widget.index].description.isNotEmpty) Padding( padding: const EdgeInsets.symmetric(horizontal: 4),