mirror of https://github.com/M66B/FairEmail.git
Setup: prepare search
This commit is contained in:
parent
aaeba52dba
commit
22e0996afb
|
@ -286,6 +286,8 @@ public class FragmentOptions extends FragmentBase {
|
|||
|
||||
pager.setCurrentItem(tab);
|
||||
FragmentBase fragment = (FragmentBase) adapter.instantiateItem(pager, tab);
|
||||
if (fragment instanceof FragmentSetup)
|
||||
((FragmentSetup) fragment).prepareSearch();
|
||||
fragment.scrollTo(resid, -48);
|
||||
menuSearch.collapseActionView();
|
||||
|
||||
|
|
|
@ -946,6 +946,18 @@ public class FragmentSetup extends FragmentBase {
|
|||
grpExtra.setVisibility(setup_extra ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
void prepareSearch() {
|
||||
try {
|
||||
manual = true;
|
||||
updateManual();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
prefs.edit().putBoolean("setup_extra", true).apply();
|
||||
updateExtra();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureVisible(View child) {
|
||||
view.post(new Runnable() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue