Fix posts not loading in anonymous front page.

This commit is contained in:
Alex Ning 2021-03-11 18:48:03 +08:00
parent e43adf966c
commit 231530c6eb
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -198,6 +198,7 @@ public class PostDataSource extends PageKeyedDataSource<String, Post> {
loadMultiRedditPostsInitial(callback, null);
break;
case TYPE_ANONYMOUS_FRONT_PAGE:
loadAnonymousFrontPagePostsInitial(callback, null);
break;
}
}
@ -235,6 +236,7 @@ public class PostDataSource extends PageKeyedDataSource<String, Post> {
loadMultiRedditPostsAfter(params, callback, null);
break;
case TYPE_ANONYMOUS_FRONT_PAGE:
loadAnonymousFrontPagePostsAfter(params, callback, null);
break;
}
}