jean
01/04/2022, 2:40 PM@ViewModelScoped
for the second view ViewModel which works fine when I navigate the first time to a contact detail view, but on every following navigation, the view shows the details of the previous contact before loading and showing the new details. Should I implement a “reset” mechanism that clears the content of the view model when navigating to a new contact, or should I use a different scope? I considered to not use any scope but then screen orientation changes would make the view model trigger the load again. What do you advice me to do ?jean
01/06/2022, 8:50 AMhiltViewModel()
https://stackoverflow.com/questions/70593281/custom-scope-for-a-view-model-with-hilt?noredirect=1#comment124805162_70593281