forked from eatvio/eatvio_app
refactor: Corrected typo in MyRecipesCubit filename and updated related tests, widgets, services, and DI registrations.
This commit is contained in:
@@ -8,7 +8,7 @@ import 'package:eatvio_app/core/utils/toasts.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_outlined_button.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart';
|
||||
import 'package:eatvio_app/features/recipe/models/my_recipe_model.dart';
|
||||
import 'package:eatvio_app/features/recipe/presentation/cubit/my_recipes_cubit/my_recieps_cubit.dart';
|
||||
import 'package:eatvio_app/features/recipe/presentation/cubit/my_recipes_cubit/my_recipes_cubit.dart';
|
||||
import 'package:eatvio_app/generated/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
@@ -207,7 +207,7 @@ class _MyRecipeWidgetState extends State<MyRecipeWidget> {
|
||||
onPressed: () {
|
||||
// Publish draft
|
||||
context.read<CreateRecipeCubit>().publishRecipe(true, widget.recipe.slug).then((success) {
|
||||
if (success) {
|
||||
if (success && context.mounted) {
|
||||
context.read<MyRecipesCubit>().setDraftedState();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user