forked from organicmaps/organicmaps
Correct way to get all downloaded map size.
This commit is contained in:
parent
d5533a903f
commit
87b3d035c1
1 changed files with 6 additions and 4 deletions
|
@ -1510,11 +1510,13 @@ Framework::DoAfterUpdate Framework::ToDoAfterUpdate() const
|
|||
if (!IsEnoughSpaceForUpdate(rootId, s))
|
||||
return DoAfterUpdate::Nothing;
|
||||
|
||||
TMwmSize constexpr maxSize = 100 * 1024 * 1024;
|
||||
TMwmSize const countrySizeInBytes = s.CountrySizeInBytes(rootId, MapOptions::Map).first;
|
||||
TMwmSize constexpr maxSizeInBytes = 100 * 1024 * 1024;
|
||||
NodeAttrs attrs;
|
||||
s.GetNodeAttrs(rootId, attrs);
|
||||
TMwmSize const countrySizeInBytes = attrs.m_localMwmSize;
|
||||
|
||||
return countrySizeInBytes > maxSize ? DoAfterUpdate::AskForUpdateMaps
|
||||
: DoAfterUpdate::AutoupdateMaps;
|
||||
return countrySizeInBytes > maxSizeInBytes ? DoAfterUpdate::AskForUpdateMaps
|
||||
: DoAfterUpdate::AutoupdateMaps;
|
||||
}
|
||||
|
||||
bool Framework::Search(search::SearchParams const & params)
|
||||
|
|
Loading…
Add table
Reference in a new issue