feat(feed): edit and delete posts

This commit is contained in:
Alex
2024-12-02 14:50:11 +03:00
parent 61ede95609
commit 2b3ecf0bf5
14 changed files with 257 additions and 29 deletions

View File

@@ -14,6 +14,7 @@ class CreateDietCubit extends Cubit<CreateDietState> {
final ProfileRepository profileRepository;
final GlossaryRepository glossaryRepository;
static const _dietStateValues = ['active', 'personal', 'draft'];
CreateDietCubit({required this.profileRepository, required this.createDietRepository, required this.glossaryRepository}) : super(CreateDietState.initial());
void setDetails(String text) {
@@ -236,7 +237,13 @@ class CreateDietCubit extends Cubit<CreateDietState> {
),
details: state.dietData.details ?? '',
dailySchedule: state.dietData.dailySchedule ?? [],
author: Author(authorSlug: authorProfile.slug, authorName: authorProfile.name, authorProfileIcon: authorProfile.profilePhotoUrl, authorIsMe: false),
author: Author(
authorSlug: authorProfile.slug,
authorName: authorProfile.name,
authorProfileIcon: authorProfile.profilePhotoUrl,
authorIsMe: false,
isEntitySubscribedByMe: false,
),
totalLikes: 0,
totalViews: 0,
totalComments: 0,