diff options
author | Ilya Grechuhin <i.grechuhin@mapswithme.com> | 2015-09-14 17:52:41 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:05:35 +0300 |
commit | 231e5de63ce16b255fa39d99947210476e2f8aba (patch) | |
tree | 2784559d2ca4afcf652dfe84495d286efd9be6cb /map/framework.cpp | |
parent | 43e224110313befa5da64d96afa737e7c0c4c218 (diff) |
[ios] Updated search to v2.0.
Diffstat (limited to 'map/framework.cpp')
-rw-r--r-- | map/framework.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 539dacdb53..844be1328d 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -986,7 +986,6 @@ void Framework::UpdateUserViewportChanged() if (IsISActive()) { (void)GetCurrentPosition(m_lastSearch.m_lat, m_lastSearch.m_lon); - m_lastSearch.m_callback = bind(&Framework::OnSearchResultsCallback, this, _1); m_lastSearch.SetSearchMode(search::SearchParams::IN_VIEWPORT_ONLY); m_lastSearch.SetForceSearch(false); @@ -994,24 +993,10 @@ void Framework::UpdateUserViewportChanged() } } -void Framework::OnSearchResultsCallback(search::Results const & results) +void Framework::UpdateSearchResults(search::Results const & results) { - if (!results.IsEndMarker() && results.GetCount() > 0) - { - // Got here from search thread. Need to switch into GUI thread to modify search mark container. - // Do copy the results structure to pass into GUI thread. - GetPlatform().RunOnGuiThread(bind(&Framework::OnSearchResultsCallbackUI, this, results)); - } -} - -void Framework::OnSearchResultsCallbackUI(search::Results const & results) -{ - if (IsISActive()) - { - FillSearchResultsMarks(results); - - Invalidate(); - } + FillSearchResultsMarks(results); + Invalidate(); } void Framework::ClearAllCaches() |