Setup: prepare search

pull/209/head
M66B 2 years ago
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…
Cancel
Save