From 1d869b309cd1399acee2e9e629c243a6a4493dd5 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Thu, 4 Jun 2020 15:00:35 +0300 Subject: [PATCH] resetSearchTypes --- .../plus/search/QuickSearchCustomPoiFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java index e3386f010a..c00d36237d 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchCustomPoiFragment.java @@ -273,7 +273,7 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi quickSearchDialogFragment.reloadCategories(); } } - searchUICore.getSearchSettings().resetSearchTypes(); + resetSearchTypes(); 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) { AndroidUiHelper.updateVisibility(searchProgressBar, searching); AndroidUiHelper.updateVisibility(searchCloseIcon, !searching); @@ -331,7 +335,7 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi private void cancelSearchSubCategories() { searchCancelled = true; - searchUICore.getSearchSettings().resetSearchTypes(); + resetSearchTypes(); updateCloseSearchIcon(false); } @@ -359,7 +363,7 @@ public class QuickSearchCustomPoiFragment extends DialogFragment implements OnFi app.runInUIThread(new Runnable() { @Override public void run() { - searchUICore.getSearchSettings().resetSearchTypes(); + resetSearchTypes(); if (!searchCancelled) { subCategoriesAdapter.setSelectedItems(selectedSubCategories); showSearchResults(results);