enviroCar / enviroCar-app

enviroCar Android Application
https://envirocar.org
GNU General Public License v3.0
89 stars 158 forks source link

Broken car selection radio button #967

Closed Jdbarad closed 1 year ago

Jdbarad commented 2 years ago

https://user-images.githubusercontent.com/93068379/204889042-60121ff1-dfb8-45d8-aeed-ddf2730d8c37.mp4

Jdbarad commented 2 years ago

Description

The radio buttons, which indicate car selection, do not update properly when visiting the car selection view. If you have selected a car and revisit the car selection view, always the radio button of the first car item in the list is activated regardless of which car has been selected actually.

How did it get fixed?

Before this solution, Car is Added Using the addCarItem function and after adding notify Adapter. Now This Solution adds the cars into usedCars and notifies the Adapter.

Conclusion

Now below Test Case working fine:

  1. Add two cars to the car selection view.
  2. Select the second car in the list.
  3. Leave the car selection view. In the Dashboard, you will notice the second car selected as expected.
  4. Go back to the car selection view and you will notice the radio button of the first car item as selected and not the second one.

Kindly review @SebaDro Sir.

SebaDro commented 1 year ago

Hey @Jdbarad. Thanks for your contribution. Actually, there was an issue with car selection for sometime. However, it has been already tackled as part of usual maintanance. It should have been fixed with d82a95f. Hence, I will close the issue for now. If you still find there is a problem with it, feel free to reopen it.