refactor(GetPublicTimeline.java): add reply visibility parameter

This commit is contained in:
LucasGGamerM
2025-04-01 11:42:31 -03:00
parent ff201014b3
commit 6f32136616

View File

@@ -10,7 +10,7 @@ import org.joinmastodon.android.model.Status;
import java.util.List;
public class GetPublicTimeline extends MastodonAPIRequest<List<Status>>{
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<List<Status>>{
addQueryParameter("since_id", sinceID);
if(limit>0)
addQueryParameter("limit", limit+"");
// MOSHIDON:
if(replyVisibility != null)
addQueryParameter("reply_visibility", replyVisibility);
}
}