Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2019-06-05 19:57:04 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2019-06-06 14:39:37 +0300
commit71182322c10ce984ec3b55983251c9ccabdd1cdf (patch)
treed53ec6b330fc8128f4c5aa53d59564fc3a8e6b1c /map
parent1e7797a6ef956c31176b92952a7ec09713283316 (diff)
[promo api] error callback is added into promo api
Diffstat (limited to 'map')
-rw-r--r--map/discovery/discovery_manager.hpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/map/discovery/discovery_manager.hpp b/map/discovery/discovery_manager.hpp
index c6ea61ffc6..2e839d857a 100644
--- a/map/discovery/discovery_manager.hpp
+++ b/map/discovery/discovery_manager.hpp
@@ -115,15 +115,14 @@ public:
{
m_promoApi.GetCityGallery(
params.m_viewportCenter,
- [this, requestId, onResult, onError, type](promo::CityGallery const & cityGallery)
- {
- CHECK_THREAD_CHECKER(m_threadChecker, ());
-
- if (cityGallery.m_items.empty())
- onError(requestId, type);
- else
- onResult(requestId, cityGallery);
- });
+ [this, requestId, onResult, type](promo::CityGallery const & cityGallery) {
+ CHECK_THREAD_CHECKER(m_threadChecker, ());
+ onResult(requestId, cityGallery);
+ },
+ [this, requestId, onError, type]() {
+ CHECK_THREAD_CHECKER(m_threadChecker, ());
+ onError(requestId, type);
+ });
break;
}
}