diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 23fc076c14..3988b3df26 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -123,21 +123,22 @@ void DrawWidget::UpdateCountryStatus(storage::TCountryId const & countryId) { if (m_currentCountryChanged != nullptr) { - // TODO @bykoianko string countryName = countryId; - uint8_t progress = 50; - auto status = m_framework->Storage().CountryStatusEx(countryId); - storage::TMwmSize sizeInBytes = 0; + uint8_t progressInPercentage = 0; + storage::MapFilesDownloader::TProgress progressInByte = make_pair(0, 0); if (!countryId.empty()) { storage::NodeAttrs nodeAttrs; m_framework->Storage().GetNodeAttrs(countryId, nodeAttrs); - sizeInBytes = nodeAttrs.m_mwmSize; + progressInByte = nodeAttrs.m_downloadingProgress; + if (progressInByte.second != 0) + progressInPercentage = static_cast(100 * progressInByte.first / progressInByte.second); } - m_currentCountryChanged(countryId, countryName, status, sizeInBytes, progress); + m_currentCountryChanged(countryId, countryName, status, + progressInByte.second, progressInPercentage); } }