From 94202097b7c133823ea2b3fb9d45f4b8f67eb796 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Wed, 23 Dec 2020 17:35:41 -0500 Subject: Reorganize and remove unused libraries --- .../infinityforreddit/subreddit/FetchSubredditData.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/FetchSubredditData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/FetchSubredditData.java index a7a9eb21..37587ede 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/FetchSubredditData.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/FetchSubredditData.java @@ -2,9 +2,9 @@ package ml.docilealligator.infinityforreddit.subreddit; import androidx.annotation.NonNull; -import com.facebook.common.internal.ImmutableMap; - import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; import java.util.Map; import ml.docilealligator.infinityforreddit.apis.RedditAPI; @@ -50,7 +50,8 @@ public class FetchSubredditData { boolean nsfw, final FetchSubredditListingDataListener fetchSubredditListingDataListener) { RedditAPI api = retrofit.create(RedditAPI.class); - Map headers = accessToken != null ? APIUtils.getOAuthHeader(accessToken) : ImmutableMap.of(); + Map map = new HashMap<>(); + Map headers = accessToken != null ? APIUtils.getOAuthHeader(accessToken) : Collections.unmodifiableMap(map); Call subredditDataCall = api.searchSubreddits(query, after, sortType, nsfw ? 1 : 0, headers); subredditDataCall.enqueue(new Callback() { @Override -- cgit v1.2.3