diff --git a/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart b/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart index 286126a6..1c93bb8f 100644 --- a/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart +++ b/lib/features/diary/presentation/widgets/glossary_moderation_request_modal_widget.dart @@ -257,12 +257,17 @@ class _GlossaryModerationRequestModalWidgetState extends State().getMyRecipes(); + } }, borderRadius: BorderRadius.circular(100), child: Container( diff --git a/lib/features/recipe/presentation/widgets/my_recipe_widget.dart b/lib/features/recipe/presentation/widgets/my_recipe_widget.dart index 31c92082..d008ee08 100644 --- a/lib/features/recipe/presentation/widgets/my_recipe_widget.dart +++ b/lib/features/recipe/presentation/widgets/my_recipe_widget.dart @@ -155,7 +155,10 @@ class _MyRecipeWidgetState extends State { final fullRecipe = await context.read().getRecipeById(widget.recipe.slug); if (context.mounted) { Navigator.pop(context); // close dialog - context.push(RecipeCreateScreen.path, extra: fullRecipe); + await context.push(RecipeCreateScreen.path, extra: fullRecipe); + if (context.mounted) { + context.read().setDraftedState(); + } } }, height: 52, @@ -236,10 +239,13 @@ class _MyRecipeWidgetState extends State { } else { showErrorToast('Заполните все необходимые поля для публикации рецепта'); if (context.mounted) { - context.push(RecipeCreateScreen.path, extra: { + await context.push(RecipeCreateScreen.path, extra: { 'recipe': fullRecipe, 'autoValidate': true, }); + if (context.mounted) { + context.read().setDraftedState(); + } } } await createCubit.close();