From 6dac05a21db742dd8f4f4308ab6768fc5155ba26 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sun, 29 Oct 2023 09:59:47 +0300 Subject: [PATCH] Fix pagination in lists --- .../joinmastodon/android/fragments/HomeTimelineFragment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java index c68fb5c8..36a0a096 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java @@ -177,6 +177,7 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD public void onSuccess(List result){ if(refreshing) list.scrollToPosition(0); + maxID=result.isEmpty() ? null : result.get(result.size()-1).id; onDataLoaded(result, !result.isEmpty()); } }) @@ -189,6 +190,7 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD public void onSuccess(List result){ if(refreshing) list.scrollToPosition(0); + maxID=result.isEmpty() ? null : result.get(result.size()-1).id; onDataLoaded(result, !result.isEmpty()); } })