#3763 IllegalArgumentException at fetchImagesForDepictedItem - pass entityId in (#3764)

This commit is contained in:
Seán Mac Gillicuddy 2020-05-21 16:50:49 +01:00 committed by GitHub
parent 618ace707b
commit df76aef070
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -90,8 +90,9 @@ public interface DepictedImagesContract {
/**
* 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)

View file

@ -136,7 +136,7 @@ public class DepictedImagesFragment extends DaggerFragment implements DepictedIm
if (!NetworkUtils.isInternetConnectionEstablished(getContext())) {
handleNoInternet();
} else {
presenter.fetchMoreImages();
presenter.fetchMoreImages(entityId);
}
}
if (isLastPage) {

View file

@ -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
@ -79,10 +78,11 @@ public class DepictedImagesPresenter implements DepictedImagesContract.UserActio
/**
* 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)