diff options
author | TacoTheDank <SkytkRSfan3895@gmail.com> | 2020-12-23 22:35:41 +0000 |
---|---|---|
committer | TacoTheDank <SkytkRSfan3895@gmail.com> | 2020-12-23 22:35:41 +0000 |
commit | 94202097b7c133823ea2b3fb9d45f4b8f67eb796 (patch) | |
tree | 8a449ca590c3a327b791f474dd5c3a1f97e8a42e /app/src/main | |
parent | bd5a0254e6c88fb34028f44f24ba7a466a8799b7 (diff) | |
download | infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.tar infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.tar.gz infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.tar.bz2 infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.tar.lz infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.tar.xz infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.tar.zst infinity-for-reddit-94202097b7c133823ea2b3fb9d45f4b8f67eb796.zip |
Reorganize and remove unused libraries
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/FetchSubredditData.java | 7 |
1 files changed, 4 insertions, 3 deletions
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<String, String> headers = accessToken != null ? APIUtils.getOAuthHeader(accessToken) : ImmutableMap.of(); + Map<String, String> map = new HashMap<>(); + Map<String, String> headers = accessToken != null ? APIUtils.getOAuthHeader(accessToken) : Collections.unmodifiableMap(map); Call<String> subredditDataCall = api.searchSubreddits(query, after, sortType, nsfw ? 1 : 0, headers); subredditDataCall.enqueue(new Callback<String>() { @Override |