mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
This commit is contained in:
parent
618ace707b
commit
df76aef070
3 changed files with 5 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public class DepictedImagesFragment extends DaggerFragment implements DepictedIm
|
|||
if (!NetworkUtils.isInternetConnectionEstablished(getContext())) {
|
||||
handleNoInternet();
|
||||
} else {
|
||||
presenter.fetchMoreImages();
|
||||
presenter.fetchMoreImages(entityId);
|
||||
}
|
||||
}
|
||||
if (isLastPage) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue