Commit Diff


commit - a6fdd4a4ee49f39feceaa7a9476025ee6e899fb9
commit + a4f512fa7a99d7d5e510ea2cec0efa0d721d42a1
blob - fbb19a0f0fed0ea985268b90e52deca3aab206fe (mode 644)
blob + /dev/null
--- mastodon/src/main/java/org/joinmastodon/android/api/requests/timelines/GetBubbleTimeline.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.joinmastodon.android.api.requests.timelines;
-
-import android.text.TextUtils;
-
-import com.google.gson.reflect.TypeToken;
-
-import org.joinmastodon.android.api.MastodonAPIRequest;
-import org.joinmastodon.android.model.Status;
-
-import java.util.List;
-
-public class GetBubbleTimeline extends MastodonAPIRequest<List<Status>> {
-    public GetBubbleTimeline(String maxID, int limit, String replyVisibility) {
-        super(HttpMethod.GET, "/timelines/bubble", new TypeToken<>(){});
-        if(!TextUtils.isEmpty(maxID))
-            addQueryParameter("max_id", maxID);
-        if(limit>0)
-            addQueryParameter("limit", limit+"");
-        if(replyVisibility != null)
-            addQueryParameter("reply_visibility", replyVisibility);
-    }
-}
blob - /dev/null
blob + d6b76e2002de700bb5dfdc0d5718415cd3c3cd7b (mode 644)
--- /dev/null
+++ mastodon/src/main/java/org/joinmastodon/android/api/requests/timelines/GetBubbleTimeline.kt
@@ -0,0 +1,18 @@
+package org.joinmastodon.android.api.requests.timelines
+
+import android.text.TextUtils
+import com.google.gson.reflect.TypeToken
+import org.joinmastodon.android.api.MastodonAPIRequest
+import org.joinmastodon.android.model.Status
+
+class GetBubbleTimeline(maxID: String?, limit: Int, replyVisibility: String?) :
+    MastodonAPIRequest<MutableList<Status?>?>(
+        HttpMethod.GET,
+        "/timelines/bubble",
+        object : TypeToken<MutableList<Status?>?>() {}) {
+    init {
+        if (!TextUtils.isEmpty(maxID)) addQueryParameter("max_id", maxID)
+        if (limit > 0) addQueryParameter("limit", limit.toString() + "")
+        if (replyVisibility != null) addQueryParameter("reply_visibility", replyVisibility)
+    }
+}