Compare commits
1 Commits
master
...
feature/lo
Author | SHA1 | Date |
---|---|---|
LucasGGamerM | 708331fca1 |
|
@ -202,15 +202,23 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
|
|||
private void onTabSelected(@IdRes int tab){
|
||||
Fragment newFragment=fragmentForTab(tab);
|
||||
if(tab==currentTab){
|
||||
if(tab == R.id.tab_search){
|
||||
if(newFragment instanceof ScrollableToTop scrollable)
|
||||
scrollable.scrollToTop();
|
||||
searchFragment.selectSearch();
|
||||
return;
|
||||
}
|
||||
if(newFragment instanceof ScrollableToTop scrollable)
|
||||
scrollable.scrollToTop();
|
||||
return;
|
||||
}
|
||||
if(tab==currentTab && tab == R.id.tab_search){
|
||||
if(newFragment instanceof ScrollableToTop scrollable)
|
||||
scrollable.scrollToTop();
|
||||
return;
|
||||
}
|
||||
getChildFragmentManager().beginTransaction().hide(fragmentForTab(currentTab)).show(newFragment).commit();
|
||||
maybeTriggerLoading(newFragment);
|
||||
// if(tab == currentTab && tab == R.id.tab_search){
|
||||
// searchFragment.selectSearch();
|
||||
// }
|
||||
currentTab=tab;
|
||||
((FragmentStackActivity)getActivity()).invalidateSystemBarColors(this);
|
||||
}
|
||||
|
@ -239,10 +247,11 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
|
|||
return true;
|
||||
}
|
||||
if(tab==R.id.tab_search){
|
||||
searchFragment.selectSearch();
|
||||
onTabSelected(R.id.tab_search);
|
||||
tabBar.selectTab(R.id.tab_search);
|
||||
searchFragment.selectSearch();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ package org.joinmastodon.android.fragments.discover;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Context;
|
||||
import android.hardware.input.InputManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
|
@ -19,7 +17,6 @@ import android.widget.ImageButton;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.joinmastodon.android.BuildConfig;
|
||||
import org.joinmastodon.android.GlobalUserPreferences;
|
||||
|
|
Loading…
Reference in New Issue