From 2dada69eb8df51e3a2835771f7f483961b1c35a4 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Sat, 3 Aug 2024 11:30:58 +0200 Subject: [PATCH] fix(Discover): switch post and hashtag fragments everywhere Fixes a regression in 5edbe9b82666e17c0f103678da6209ef7e9eaf17, whcih did not switch the fragments everywhere. This caused the scroll-to-top functionality to not work and the posts to not immediatly load. Closes https://github.com/LucasGGamerM/moshidon/issues/483. --- .../android/fragments/discover/DiscoverFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 c68fab58d3..c70e1b7e4c 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 @@ -260,8 +260,8 @@ private void exitSearch(){ private Fragment getFragmentForPage(int page){ return switch(page){ - case 0 -> hashtagsFragment; - case 1 -> postsFragment; + case 0 -> postsFragment; + case 1 -> hashtagsFragment; case 2 -> newsFragment; case 3 -> accountsFragment; default -> throw new IllegalStateException("Unexpected value: "+page);