Search in sources :

Example 1 with Image

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));
    }
}
Also used : PhilmMovie(app.philm.in.model.PhilmMovie) ArrayList(java.util.ArrayList) Image(com.uwetrottmann.tmdb.entities.Image) MoviesState(app.philm.in.state.MoviesState)

Aggregations

PhilmMovie (app.philm.in.model.PhilmMovie)1 MoviesState (app.philm.in.state.MoviesState)1 Image (com.uwetrottmann.tmdb.entities.Image)1 ArrayList (java.util.ArrayList)1