From 1071517e3c83a76ad19d79e92ac0263d16755004 Mon Sep 17 00:00:00 2001 From: sk Date: Mon, 27 Nov 2023 23:01:58 +0100 Subject: [PATCH] merge --- .../android/api/requests/timelines/GetPublicTimeline.java | 8 ++++++-- .../fragments/discover/FederatedTimelineFragment.java | 2 +- .../android/fragments/discover/LocalTimelineFragment.java | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/requests/timelines/GetPublicTimeline.java b/mastodon/src/main/java/org/joinmastodon/android/api/requests/timelines/GetPublicTimeline.java index 328bf869a5..098a480e46 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/requests/timelines/GetPublicTimeline.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/requests/timelines/GetPublicTimeline.java @@ -10,7 +10,7 @@ import java.util.List; public class GetPublicTimeline extends MastodonAPIRequest>{ - public GetPublicTimeline(boolean local, boolean remote, String maxID, int limit, String replyVisibility){ + public GetPublicTimeline(boolean local, boolean remote, String maxID, String minID, int limit, String sinceID, String replyVisibility){ super(HttpMethod.GET, "/timelines/public", new TypeToken<>(){}); if(local) addQueryParameter("local", "true"); @@ -18,9 +18,13 @@ public GetPublicTimeline(boolean local, boolean remote, String maxID, int limit, addQueryParameter("remote", "true"); if(!TextUtils.isEmpty(maxID)) addQueryParameter("max_id", maxID); + if(!TextUtils.isEmpty(minID)) + addQueryParameter("min_id", minID); + if(!TextUtils.isEmpty(sinceID)) + addQueryParameter("since_id", sinceID); if(limit>0) addQueryParameter("limit", limit+""); - if(replyVisibility != null) + if(!TextUtils.isEmpty(replyVisibility)) addQueryParameter("reply_visibility", replyVisibility); } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/FederatedTimelineFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/FederatedTimelineFragment.java index 5ff0637380..eb74bd278c 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/FederatedTimelineFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/FederatedTimelineFragment.java @@ -29,7 +29,7 @@ public void onCreate(Bundle savedInstanceState){ @Override protected void doLoadData(int offset, int count){ - currentRequest=new GetPublicTimeline(false, false, getMaxID(), count, getLocalPrefs().timelineReplyVisibility) + currentRequest=new GetPublicTimeline(false, false, getMaxID(), null, count, null, getLocalPrefs().timelineReplyVisibility) .setCallback(new SimpleCallback<>(this){ @Override public void onSuccess(List result){ diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/LocalTimelineFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/LocalTimelineFragment.java index aae59908c7..d6975f9af5 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/LocalTimelineFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/LocalTimelineFragment.java @@ -29,7 +29,7 @@ public void onCreate(Bundle savedInstanceState){ @Override protected void doLoadData(int offset, int count){ - currentRequest=new GetPublicTimeline(true, false, getMaxID(), count, getLocalPrefs().timelineReplyVisibility) + currentRequest=new GetPublicTimeline(true, false, getMaxID(), null, count, null, getLocalPrefs().timelineReplyVisibility) .setCallback(new SimpleCallback<>(this){ @Override public void onSuccess(List result){