diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-06-18 01:21:37 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-06-18 01:21:37 +0000 |
commit | c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97 (patch) | |
tree | bfa32f9b3ba5840d89ff342b917d8ca2da1368f9 /app/src/main | |
parent | d644c1c03215932d12b85a223eddf5f3f750d143 (diff) | |
download | infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.tar infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.tar.gz infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.tar.bz2 infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.tar.lz infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.tar.xz infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.tar.zst infinity-for-reddit-c8e5f60c0ab746ff0b1bc815c92d9a2851fcec97.zip |
Try fixing retrofit2.Utils.methodError in PostPagingSource when loading anonymous front page.
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java index 7c256d59..7b0930ec 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java @@ -88,6 +88,9 @@ public class PostPagingSource extends ListenableFuturePagingSource<String, Post> this.postFeedScrolledPositionSharedPreferences = postFeedScrolledPositionSharedPreferences; if (postType == TYPE_SUBREDDIT || postType == TYPE_ANONYMOUS_FRONT_PAGE || postType == TYPE_ANONYMOUS_MULTIREDDIT) { this.subredditOrUserName = path; + if (subredditOrUserName == null) { + subredditOrUserName = "popular"; + } } else { if (sortType != null) { if (path.endsWith("/")) { @@ -101,7 +104,7 @@ public class PostPagingSource extends ListenableFuturePagingSource<String, Post> } this.postType = postType; if (sortType == null) { - if (path.equals("popular") || path.equals("all")) { + if ("popular".equals(path) || "all".equals(path)) { this.sortType = new SortType(SortType.Type.HOT); } else { this.sortType = new SortType(SortType.Type.BEST); |