diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java index 675f3d11e..08a942a76 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeFragment.java @@ -309,9 +309,14 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene return true; } if(tab==R.id.tab_search){ + int previousTab = currentTab; + onTabSelected(R.id.tab_search); tabBar.selectTab(R.id.tab_search); - discoverFragment.openSearch(); + + if(previousTab != R.id.tab_search) + discoverFragment.openSearch(); + return true; } if(tab==R.id.tab_home){