fix category tabbar
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user