From 8d9f017914b1e832c1a6b17bbac8a241d5fe8ad0 Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 12 Oct 2015 16:52:53 +0300 Subject: [PATCH] [search] Hot fix for tablet layout search (viewport only mode). Will increase search viewport until get at least 30 results. --- search/search_engine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/search/search_engine.cpp b/search/search_engine.cpp index f87869598f..c1211a8177 100644 --- a/search/search_engine.cpp +++ b/search/search_engine.cpp @@ -239,7 +239,8 @@ void Engine::SearchAsync() if (res.GetCount() > 0) EmitResults(params, res); } - else + + if (res.GetCount() < RESULTS_COUNT) { while (!m_query->IsCancelled()) { @@ -266,7 +267,7 @@ void Engine::SearchAsync() // Make additional search in whole mwm when not enough results (only for non-empty query). size_t const count = res.GetCount(); - if (!viewportSearch && !m_query->IsCancelled() && count < RESULTS_COUNT) + if (!m_query->IsCancelled() && count < RESULTS_COUNT) { try {