From 5edbe9b82666e17c0f103678da6209ef7e9eaf17 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Mon, 22 Jul 2024 17:21:12 -0300 Subject: [PATCH] fix(discover-fragment): put Posts fragment in the first place Fixes #472 --- .../android/fragments/discover/DiscoverFragment.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java index 69872bd7a..c68fab58d 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/discover/DiscoverFragment.java @@ -82,8 +82,8 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop, for(int i=0;i R.id.discover_hashtags; - case 1 -> R.id.discover_posts; + case 0 -> R.id.discover_posts; + case 1 -> R.id.discover_hashtags; case 2 -> R.id.discover_news; case 3 -> R.id.discover_users; default -> throw new IllegalStateException("Unexpected value: "+i); @@ -127,8 +127,8 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop, accountsFragment.setArguments(args); getChildFragmentManager().beginTransaction() - .add(R.id.discover_hashtags, hashtagsFragment) .add(R.id.discover_posts, postsFragment) + .add(R.id.discover_hashtags, hashtagsFragment) .add(R.id.discover_news, newsFragment) .add(R.id.discover_users, accountsFragment) .commit(); @@ -138,8 +138,8 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop, @Override public void onConfigureTab(@NonNull TabLayout.Tab tab, int position){ tab.setText(switch(position){ - case 0 -> R.string.hashtags; - case 1 -> R.string.posts; + case 0 -> R.string.posts; + case 1 -> R.string.hashtags; case 2 -> R.string.news; case 3 -> R.string.for_you; default -> throw new IllegalStateException("Unexpected value: "+position);