fix category tabbar

This commit is contained in:
efrilm
2025-10-08 13:01:26 +07:00
parent 613b216c04
commit 1fbacae1f4
4 changed files with 34 additions and 3 deletions
@@ -60,13 +60,13 @@ class CategoryLoaderBloc
},
(response) async {
final categories = response.data.categories;
categories.insert(0, CategoryModel.all());
final totalPages = response.data.totalPages;
final hasReachedMax = categories.length < 10 || 1 >= totalPages;
log('✅ Categories loaded: ${categories.length}, hasReachedMax: $hasReachedMax');
categories.insert(0, CategoryModel.all());
emit(CategoryLoaderState.loaded(
categories: categories,
hasReachedMax: hasReachedMax,