diff --git a/map/booking_filter_params.hpp b/map/booking_filter_params.hpp index a8630ab7be..8cb06b047b 100644 --- a/map/booking_filter_params.hpp +++ b/map/booking_filter_params.hpp @@ -110,6 +110,11 @@ public: }); } + bool IsEmpty() const + { + return m_tasks.empty(); + } + void Clear() { m_tasks.clear(); diff --git a/map/everywhere_search_callback.cpp b/map/everywhere_search_callback.cpp index b25ebebaa7..9ea7de34d5 100644 --- a/map/everywhere_search_callback.cpp +++ b/map/everywhere_search_callback.cpp @@ -24,7 +24,8 @@ void EverywhereSearchCallback::operator()(Results const & results) m_productInfo.push_back(m_delegate.GetProductInfo(results[i])); } - if (results.IsEndedNormal() && results.GetType() == Results::Type::Hotels) + if (results.IsEndedNormal() && results.GetType() == Results::Type::Hotels && + !m_bookingFilterTasks.IsEmpty()) { m_delegate.FilterResultsForHotelsQuery(m_bookingFilterTasks, results, false /* inViewport */); } diff --git a/map/viewport_search_callback.cpp b/map/viewport_search_callback.cpp index b850c41f8f..88e598333d 100644 --- a/map/viewport_search_callback.cpp +++ b/map/viewport_search_callback.cpp @@ -91,7 +91,8 @@ void ViewportSearchCallback::operator()(Results const & results) }); } - if (results.IsEndedNormal() && results.GetType() == Results::Type::Hotels) + if (results.IsEndedNormal() && results.GetType() == Results::Type::Hotels && + !m_bookingFilterTasks.IsEmpty()) { m_delegate.FilterResultsForHotelsQuery(m_bookingFilterTasks, results, true /* inViewport */); }