Adapter in Fragment not updating when the data changes in the viewModel from an action in Main Activity
I have a room database where I have songs associated with artists and when I change artist from the Main Activity overflow menu, the fragment with the recyclerview showing a list of songs doesn't update unless I navigate away from the fragment and back again. I thought my observing of the list was sufficient because it worked for other changes being made but not this time.
How do I get it to update with the new artist's songs when data changes?
songViewModel
//default artist name for this...