Open fadi-botros opened 5 years ago
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 ??
Movie
Would you reload all data by changing the LiveData content to the new List ?
LiveData
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
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 ?