Лаб 5: фикс

This commit is contained in:
Safgerd 2024-01-21 15:21:18 +04:00
parent 1b14d0c301
commit 0f3829e6ea
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class CategoryRepository @Inject constructor(
@OptIn(ExperimentalPagingApi::class)
fun getAllPaged(token: String): Flow<PagingData<Category>> = Pager(
config = PagingConfig(
pageSize = 3,
pageSize = 20,
enablePlaceholders = false
),
pagingSourceFactory = categoryDao::getPaged,

View File

@ -96,7 +96,7 @@ fun EditMenuCategoryProductsCard(
){
val productListUiState = menuViewModel.getProductsByCategoryId(category.id!!, searchToken).collectAsState(initial = listOf())
if (productListUiState.value?.size != 0){
if (productListUiState.value!= null){
Text(
text = category.name,
color = Color.Black,

View File

@ -92,7 +92,7 @@ fun MenuCategoryProductsCard(
){
val productListUiState = menuViewModel.getProductsByCategoryId(category.id!!, searchToken).collectAsState(initial = listOf())
if (productListUiState.value?.size != 0){
if (productListUiState.value != null){
Text(
text = category.name,
color = Color.Black,