diff options
author | ByteHamster <info@bytehamster.com> | 2022-05-14 17:07:45 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-05-15 17:57:15 +0200 |
commit | 0510539e29345152df8b9fe4b9c45f6680032a44 (patch) | |
tree | 1e3c89226534328e8a1b9a759ae1f0415bebc509 /app | |
parent | 8cac0c71e4cfc76f01b5b8c3145e865b9f13cc99 (diff) | |
download | AntennaPod-0510539e29345152df8b9fe4b9c45f6680032a44.zip |
Fix 'load more' not detecting next page
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java index bb20cb4bc..fa2ed61ce 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java @@ -163,8 +163,11 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem public void onScrolled(@NonNull RecyclerView view, int deltaX, int deltaY) { super.onScrolled(view, deltaX, deltaY); boolean hasMorePages = feed != null && feed.isPaged() && feed.getNextPageLink() != null; - nextPageLoader.getRoot().setVisibility( - (viewBinding.recyclerView.isScrolledToBottom() && hasMorePages) ? View.VISIBLE : View.GONE); + boolean pageLoaderVisible = viewBinding.recyclerView.isScrolledToBottom() && hasMorePages; + nextPageLoader.getRoot().setVisibility(pageLoaderVisible ? View.VISIBLE : View.GONE); + viewBinding.recyclerView.setPadding( + viewBinding.recyclerView.getPaddingLeft(), 0, viewBinding.recyclerView.getPaddingRight(), + pageLoaderVisible ? nextPageLoader.getRoot().getMeasuredHeight() : 0); } }); |