Skip to content

#3763 IllegalArgumentException at fetchImagesForDepictedItem #3764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ interface UserActionListener extends BasePresenter<View> {

/**
* Fetches more images for the item and adds it to the grid view adapter
* @param entityId
*/
void fetchMoreImages();
void fetchMoreImages(String entityId);

/**
* fetch captions for the image using filename and replace title of on the image thumbnail(if captions are available)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCoun
if (!NetworkUtils.isInternetConnectionEstablished(getContext())) {
handleNoInternet();
} else {
presenter.fetchMoreImages();
presenter.fetchMoreImages(entityId);
}
}
if (isLastPage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class DepictedImagesPresenter implements DepictedImagesContract.UserActio
* Wikibase enitityId for the depicted Item
* Ex: Q9394
*/
private String entityId = null;
private List<Media> queryList = new ArrayList<>();

@Inject
Expand Down Expand Up @@ -79,10 +78,11 @@ public void initList(String entityId) {

/**
* Fetches more images for the item and adds it to the grid view adapter
* @param entityId
*/
@SuppressLint("CheckResult")
@Override
public void fetchMoreImages() {
public void fetchMoreImages(String entityId) {
view.progressBarVisible(true);
compositeDisposable.add(depictsClient.fetchImagesForDepictedItem(entityId, queryList.size())
.subscribeOn(ioScheduler)
Expand Down