mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit
synced 2024-07-03 08:18:40 +00:00
Try fixing retrofit2.Utils.methodError in PostPagingSource when loading anonymous front page.
This commit is contained in:
parent
d644c1c032
commit
c8e5f60c0a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user