forked from organicmaps/organicmaps-tmp
[ios] Fixed zero update size display for leaf node.
This commit is contained in:
parent
6674f50c45
commit
29ea6dda61
1 changed files with 3 additions and 12 deletions
|
@ -597,19 +597,10 @@ using namespace mwm;
|
|||
|
||||
if (buttons & UpdateAction)
|
||||
{
|
||||
TCountriesVec downloadedChildren;
|
||||
TCountriesVec availableChildren;
|
||||
s.GetChildrenInGroups(m_actionSheetId, downloadedChildren, availableChildren);
|
||||
TMwmSize updateSize = 0;
|
||||
for (TCountryId const & countryId : downloadedChildren)
|
||||
{
|
||||
NodeAttrs nodeAttrs;
|
||||
s.GetNodeAttrs(countryId, nodeAttrs);
|
||||
if (nodeAttrs.m_status == NodeStatus::OnDiskOutOfDate)
|
||||
updateSize += nodeAttrs.m_mwmSize;
|
||||
}
|
||||
Storage::UpdateInfo updateInfo;
|
||||
s.GetUpdateInfo(m_actionSheetId, updateInfo);
|
||||
NSString * title = [NSString stringWithFormat:kAllMapsLabelFormat, kUpdateActionTitle,
|
||||
formattedSize(updateSize)];
|
||||
formattedSize(updateInfo.m_totalUpdateSizeInBytes)];
|
||||
[actionSheet addButtonWithTitle:title];
|
||||
UIAlertAction * action = [UIAlertAction actionWithTitle:title
|
||||
style:UIAlertActionStyleDefault
|
||||
|
|
Loading…
Add table
Reference in a new issue