Merge pull request #2862 from syershov/fix-progress-for-serverlist

[downloader] Fix progress calculation while getting servers list
This commit is contained in:
Vladimir Byko-Ianko 2016-04-11 13:25:42 +03:00
commit bc6b945b31

View file

@ -1333,7 +1333,12 @@ void Storage::GetNodeAttrs(TCountryId const & countryId, NodeAttrs & nodeAttrs)
: kInvalidCountryId;
MapFilesDownloader::TProgress downloadingMwmProgress(0, 0);
if (!m_downloader->IsIdle())
{
downloadingMwmProgress = m_downloader->GetDownloadingProgress();
// If we don't know estimated file size then we ignore its progress.
if (downloadingMwmProgress.second == -1)
downloadingMwmProgress = {0, 0};
}
TCountriesSet setQueue;
GetQueuedCountries(m_queue, setQueue);