resetSearchTypes

This commit is contained in:
veliymolfar 2020-06-04 15:00:35 +03:00
parent a299b01bac
commit 1d869b309c

View file

@ -273,7 +273,7 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi
quickSearchDialogFragment.reloadCategories(); quickSearchDialogFragment.reloadCategories();
} }
} }
searchUICore.getSearchSettings().resetSearchTypes(); resetSearchTypes();
super.onDismiss(dialog); super.onDismiss(dialog);
} }
@ -301,6 +301,10 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi
}); });
} }
private void resetSearchTypes() {
searchUICore.updateSettings(searchUICore.getSearchSettings().resetSearchTypes());
}
private void updateCloseSearchIcon(boolean searching) { private void updateCloseSearchIcon(boolean searching) {
AndroidUiHelper.updateVisibility(searchProgressBar, searching); AndroidUiHelper.updateVisibility(searchProgressBar, searching);
AndroidUiHelper.updateVisibility(searchCloseIcon, !searching); AndroidUiHelper.updateVisibility(searchCloseIcon, !searching);
@ -331,7 +335,7 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi
private void cancelSearchSubCategories() { private void cancelSearchSubCategories() {
searchCancelled = true; searchCancelled = true;
searchUICore.getSearchSettings().resetSearchTypes(); resetSearchTypes();
updateCloseSearchIcon(false); updateCloseSearchIcon(false);
} }
@ -359,7 +363,7 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi
app.runInUIThread(new Runnable() { app.runInUIThread(new Runnable() {
@Override @Override
public void run() { public void run() {
searchUICore.getSearchSettings().resetSearchTypes(); resetSearchTypes();
if (!searchCancelled) { if (!searchCancelled) {
subCategoriesAdapter.setSelectedItems(selectedSubCategories); subCategoriesAdapter.setSelectedItems(selectedSubCategories);
showSearchResults(results); showSearchResults(results);