mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Chek if getContext() is instanceOf CategoryImagesCallback and only then request more images
This commit is contained in:
parent
a78e167676
commit
668b5896a2
1 changed files with 1 additions and 1 deletions
|
|
@ -329,7 +329,7 @@ public class MediaDetailPagerFragment extends CommonsDaggerSupportFragment imple
|
||||||
Timber.d("Returning as activity is destroyed!");
|
Timber.d("Returning as activity is destroyed!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (i+1 >= adapter.getCount())
|
if (i+1 >= adapter.getCount() && getContext() instanceof CategoryImagesCallback)
|
||||||
((CategoryImagesCallback) getContext()).requestMoreImages();
|
((CategoryImagesCallback) getContext()).requestMoreImages();
|
||||||
|
|
||||||
getActivity().invalidateOptionsMenu();
|
getActivity().invalidateOptionsMenu();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue