| 330 | } |
| 331 | |
| 332 | void UpdateDialog::StartSearchInDownloader() |
| 333 | { |
| 334 | CHECK(!m_query.empty(), ()); |
| 335 | |
| 336 | auto const timestamp = m_fillTreeTimestamp; |
| 337 | |
| 338 | DownloaderSearchParams params{m_query, m_locale, |
| 339 | // m_onResults |
| 340 | [this, timestamp](DownloaderSearchResults const & results) |
| 341 | { |
| 342 | Filter filter; |
| 343 | for (size_t i = 0; i < results.m_results.size(); ++i) |
| 344 | { |
| 345 | auto const & res = results.m_results[i]; |
| 346 | auto const added = filter.emplace(res.m_countryId, make_pair(i + 1, res.m_matchedName)); |
| 347 | if (!added.second) |
| 348 | LOG(LWARNING, ("Duplicate CountryId in results for query:", results.m_query)); |
| 349 | } |
| 350 | |
| 351 | FillTree(filter, timestamp); |
| 352 | }}; |
| 353 | |
| 354 | m_framework.GetSearchAPI().SearchInDownloader(std::move(params)); |
| 355 | } |
| 356 | |
| 357 | void UpdateDialog::FillTree(optional<Filter> const & filter, uint64_t timestamp) |
| 358 | { |
nothing calls this directly
no test coverage detected