Лаб 5: фикс
This commit is contained in:
parent
1b14d0c301
commit
0f3829e6ea
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user