Skip to content

Commit

Permalink
Chek if getContext() is instanceOf CategoryImagesCallback and only th…
Browse files Browse the repository at this point in the history
…en request more images
  • Loading branch information
kbhardwaj123 authored Mar 14, 2020
1 parent a78e167 commit 668b589
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public void onPageScrolled(int i, float v, int i2) {
Timber.d("Returning as activity is destroyed!");
return;
}
if (i+1 >= adapter.getCount())
if (i+1 >= adapter.getCount() && getContext() instanceof CategoryImagesCallback)
((CategoryImagesCallback) getContext()).requestMoreImages();

getActivity().invalidateOptionsMenu();
Expand Down

0 comments on commit 668b589

Please sign in to comment.