From 4a0e4edef815869603e6e577d2a1637da1aeb43d Mon Sep 17 00:00:00 2001 From: sk Date: Wed, 7 Jun 2023 20:28:56 +0200 Subject: [PATCH] load more if screen isn't full yet --- .../android/fragments/BaseStatusListFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java index 5ae8a2d0f..debbf06f2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java @@ -754,6 +754,13 @@ public abstract class BaseStatusListFragment exten assistContent.setWebUri(getWebUri(getSession().getInstanceUri().buildUpon())); } + @Override + protected void onDataLoaded(List d, boolean more) { + super.onDataLoaded(d, more); + // more available, but the page isn't even full yet? seems wrong, let's load some more + if (more && d.size() < itemsPerPage) preloader.onScrolledToLastItem(); + } + protected class DisplayItemsAdapter extends UsableRecyclerView.Adapter> implements ImageLoaderRecyclerAdapter{ public DisplayItemsAdapter(){