google-developer-training / basic-android-kotlin-compose-training-inventory-app

Apache License 2.0
77 stars 84 forks source link

Read and update data using Room #78

Open shivathapaa opened 9 months ago

shivathapaa commented 9 months ago

URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-update-data-room#7

Specify the language of the codelab if it is not English:

In which task and step of the codelab can this issue be found? In step 8, Implement sell item.

Describe the problem In "Add a function in the ViewModel" section,

  1. the code snippet at the point number 3 is missing itemDetails i.e. uiState.value.toItem() -> uiState.value.itemDetails.toItem()
  2. there is typographical mistake at point number 4. It should be quantity instead of quality. (Add an if statement to check if the quality is greater than 0.)

Steps to reproduce?

  1. Go to the codelab link, scrolldown to the "Add a function in the ViewModel" section.
  2. Click on...
  3. See mistake at point number 3, and 4.

Versions Android Studio version: API version of the emulator:

Additional information image