Open fe60 opened 1 year ago
[Android Basics with Compose Unit 6: Data persistence Use Room for data persistence Read and update data with Room
In which task and step of the codelab can this issue be found? section Add a function in the ViewModel, step 13
ViewModel
Describe the problem
Run your app. Notice that the app disables the Sell button when the quantity in stock is zero.
Button is not disabled. The related argument is always true in branch room. https://github.com/google-developer-training/basic-android-kotlin-compose-training-inventory-app/blob/d118e8d77b7318deda5ddbfa8539f7578e2ade8c/app/src/main/java/com/example/inventory/ui/item/ItemDetailsScreen.kt#L118-L123
true
It should be enabled = !itemDetailsUiState.outOfStock as in branch main
enabled = !itemDetailsUiState.outOfStock
[Android Basics with Compose Unit 6: Data persistence Use Room for data persistence Read and update data with Room
In which task and step of the codelab can this issue be found? section Add a function in the
ViewModel
, step 13Describe the problem
Button is not disabled. The related argument is always
true
in branch room. https://github.com/google-developer-training/basic-android-kotlin-compose-training-inventory-app/blob/d118e8d77b7318deda5ddbfa8539f7578e2ade8c/app/src/main/java/com/example/inventory/ui/item/ItemDetailsScreen.kt#L118-L123It should be
enabled = !itemDetailsUiState.outOfStock
as in branch main