From 6f32136616a921fcbc8c6eebec5dc16680688ed1 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 1 Apr 2025 11:42:31 -0300 Subject: [PATCH] refactor(GetPublicTimeline.java): add reply visibility parameter --- .../android/api/requests/timelines/GetPublicTimeline.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 4486f3f89..ef88ce507 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 org.joinmastodon.android.model.Status; import java.util.List; public class GetPublicTimeline extends MastodonAPIRequest>{ - public GetPublicTimeline(boolean local, boolean remote, String maxID, String minID, int limit, String sinceID){ + 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"); @@ -24,5 +24,8 @@ public class GetPublicTimeline extends MastodonAPIRequest>{ addQueryParameter("since_id", sinceID); if(limit>0) addQueryParameter("limit", limit+""); + // MOSHIDON: + if(replyVisibility != null) + addQueryParameter("reply_visibility", replyVisibility); } }