From 231530c6eb65819f3dd3ff7b015f2a5b41d53a67 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 11 Mar 2021 18:48:03 +0800 Subject: Fix posts not loading in anonymous front page. --- .../FetchPostFilterReadPostsAndConcatenatedSubredditNames.java | 2 +- .../java/ml/docilealligator/infinityforreddit/post/PostDataSource.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPostFilterReadPostsAndConcatenatedSubredditNames.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPostFilterReadPostsAndConcatenatedSubredditNames.java index e594b504..328a2e52 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPostFilterReadPostsAndConcatenatedSubredditNames.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchPostFilterReadPostsAndConcatenatedSubredditNames.java @@ -44,7 +44,7 @@ public class FetchPostFilterReadPostsAndConcatenatedSubredditNames { if (anonymousSubscribedSubreddits != null && !anonymousSubscribedSubreddits.isEmpty()) { StringBuilder stringBuilder = new StringBuilder(); for (SubscribedSubredditData s : anonymousSubscribedSubreddits) { - stringBuilder.append(s).append("+"); + stringBuilder.append(s.getName()).append("+"); } if (stringBuilder.length() > 0) { stringBuilder.deleteCharAt(stringBuilder.length() - 1); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostDataSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostDataSource.java index e6991a7b..8c567809 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostDataSource.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostDataSource.java @@ -198,6 +198,7 @@ public class PostDataSource extends PageKeyedDataSource { loadMultiRedditPostsInitial(callback, null); break; case TYPE_ANONYMOUS_FRONT_PAGE: + loadAnonymousFrontPagePostsInitial(callback, null); break; } } @@ -235,6 +236,7 @@ public class PostDataSource extends PageKeyedDataSource { loadMultiRedditPostsAfter(params, callback, null); break; case TYPE_ANONYMOUS_FRONT_PAGE: + loadAnonymousFrontPagePostsAfter(params, callback, null); break; } } -- cgit v1.2.3