diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/search/QuickSearchDialogFragment.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/search/QuickSearchDialogFragment.java index 75ce158eea..0168205045 100644 --- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/search/QuickSearchDialogFragment.java +++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/search/QuickSearchDialogFragment.java @@ -657,7 +657,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements SampleC } private void runCoreSearchInternal(String text, boolean updateResult, boolean searchMore) { - SearchResultCollection c = searchUICore.search(text, updateResult, new ResultMatcher() { + searchUICore.search(text, updateResult, new ResultMatcher() { SearchResultCollection regionResultCollection = null; SearchCoreAPI regionResultApi = null; List results = new ArrayList<>(); @@ -673,7 +673,14 @@ public class QuickSearchDialogFragment extends DialogFragment implements SampleC switch (object.objectType) { case SEARCH_STARTED: case SEARCH_FINISHED: + break; case FILTER_FINISHED: + app.runInUIThread(new Runnable() { + @Override + public void run() { + updateSearchResult(searchUICore.getCurrentSearchResult(), false); + } + }); break; case SEARCH_API_FINISHED: @@ -722,9 +729,6 @@ public class QuickSearchDialogFragment extends DialogFragment implements SampleC updateSearchResult(null, false); } } - if (updateResult) { - updateSearchResult(c, false); - } } private void showApiResults(final List apiResults, final SearchPhrase phrase,