From 6910947dee75b856bf6cff44ca382bdfc7366479 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sat, 16 Oct 2021 11:34:03 +0800 Subject: Fix FilteredPostsActivity problem in anonymous mode. --- .../infinityforreddit/activities/FilteredPostsActivity.java | 1 + .../ml/docilealligator/infinityforreddit/fragments/PostFragment.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java index 29991f5c..175ff228 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java @@ -263,6 +263,7 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec private void bindView(PostFilter postFilter, boolean initializeFragment) { switch (postType) { case PostPagingSource.TYPE_FRONT_PAGE: + case PostPagingSource.TYPE_ANONYMOUS_FRONT_PAGE: getSupportActionBar().setTitle(R.string.home); break; case PostPagingSource.TYPE_SEARCH: diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index 2b6dedf3..1d4ca62f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -1644,7 +1644,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { intent.putExtra(FilteredPostsActivity.EXTRA_NAME, subredditName); intent.putExtra(FilteredPostsActivity.EXTRA_POST_TYPE, postType); startActivity(intent); - } else if (postType == PostPagingSource.TYPE_MULTI_REDDIT) { + } else if (postType == PostPagingSource.TYPE_MULTI_REDDIT || postType == PostPagingSource.TYPE_ANONYMOUS_MULTIREDDIT) { Intent intent = new Intent(activity, FilteredPostsActivity.class); intent.putExtra(FilteredPostsActivity.EXTRA_NAME, multiRedditPath); intent.putExtra(FilteredPostsActivity.EXTRA_POST_TYPE, postType); -- cgit v1.2.3