use of com.uwetrottmann.tmdb.entities.Image in project philm by chrisbanes.
the class FetchTmdbMovieImagesRunnable method onSuccess.
@Override
public void onSuccess(Images result) {
PhilmMovie movie = mMoviesState.getMovie(mId);
if (movie != null) {
if (!PhilmCollections.isEmpty(result.backdrops)) {
List<PhilmMovie.BackdropImage> backdrops = new ArrayList<>();
for (Image image : result.backdrops) {
backdrops.add(new PhilmMovie.BackdropImage(image));
}
movie.setBackdropImages(backdrops);
}
getEventBus().post(new MoviesState.MovieImagesUpdatedEvent(getCallingId(), movie));
}
}
Aggregations