socket fixed

This commit is contained in:
Username1548
2025-01-19 15:10:56 +07:00
parent ab7004f9fd
commit 7eaf0bc1bb
29 changed files with 489 additions and 1006 deletions

View File

@@ -9,7 +9,7 @@ import 'package:eatvio_app/features/feed/presentation/bloc/diets_cubit/diets_sta
import 'package:eatvio_app/features/feed/repositories/feed_repository.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class DietsCubit extends Cubit<DietsState>{
class DietsCubit extends Cubit<DietsState> {
final FeedRepository feedRepository;
final DietRepository dietsRepository;
int currentPage = 1;
@@ -52,7 +52,6 @@ class DietsCubit extends Cubit<DietsState>{
super.close();
}
void changeTypeFilter(int index) {
emit(state.copyWith(filterState: state.filterState.copyWith(typeIndex: index), errorMessage: null));
EasyDebounce.debounce(
@@ -64,7 +63,6 @@ class DietsCubit extends Cubit<DietsState>{
);
}
void changeSortingType(int index) {
emit(state.copyWith(filterState: state.filterState.copyWith(sortingIndex: index), errorMessage: null));
EasyDebounce.debounce(
@@ -76,7 +74,6 @@ class DietsCubit extends Cubit<DietsState>{
);
}
void changeDurationFilter(int index) {
emit(state.copyWith(filterState: state.filterState.copyWith(durationIndex: index), errorMessage: null));
EasyDebounce.debounce(
@@ -153,6 +150,7 @@ class DietsCubit extends Cubit<DietsState>{
Future<void> likeDiet(int id, int index) async {
final currentDiets = state.dietsList;
if (currentDiets.isEmpty) return;
final dietsForModification = [...currentDiets];
final currentDiet = currentDiets[index];
if (currentDiet.wasLikedByMe) {