Let’s say I have a view showing a list of contacts...
# dagger
j
Let’s say I have a view showing a list of contacts and a second view showing the detail of a contact. I have used
@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 ?