PopularMovies icon indicating copy to clipboard operation
PopularMovies copied to clipboard

What if a detail inside the ViewModel changed ??

Open fadi-botros opened this issue 5 years ago • 1 comments

https://github.com/NohaSamir/PopularMovies/blob/44d3969858e10013bd3c359c48aab475913b2501/app/src/main/java/com/example/android/popularmovies/view_model/MainViewModel.java#L25

More good work by you. But, what if a Movie (for example, if there is a number of reviews), changed ??

Would you reload all data by changing the LiveData content to the new List ?

fadi-botros avatar Jul 31 '19 21:07 fadi-botros

You can create method onChang and post the new value inside it

For more details you can check this answer https://stackoverflow.com/a/52287357

NohaSamir avatar Aug 02 '19 22:08 NohaSamir