@Override public void populateUi(MovieImagesView view, String parameter) { final MovieWrapper movie = MMoviesApp.get().getState().getMovie(parameter); if (movie != null && !MoviesCollections.isEmpty(movie.getBackdropImages())) { view.setData(Collections.unmodifiableList(movie.getBackdropImages())); } }
private void fetchMovieImagesIfNeeded(final int callingId, String parameter) { Preconditions.checkNotNull(parameter, "id cannot be null"); MovieWrapper movie = MMoviesApp.get().getState().getMovie(parameter); if (movie != null && MoviesCollections.isEmpty(movie.getBackdropImages())) { fetchMovieImages(callingId, parameter); } }