forked from organicmaps/organicmaps
[iOS] show "cancel all" button on maps update screen
This commit is contained in:
parent
e98624d6e2
commit
8075c74d9a
1 changed files with 18 additions and 2 deletions
|
@ -233,8 +233,8 @@ using namespace storage;
|
|||
{
|
||||
Storage::UpdateInfo updateInfo{};
|
||||
s.GetUpdateInfo(parentCountryId, updateInfo);
|
||||
self.showAllMapsButtons = updateInfo.m_numberOfMwmFilesToUpdate != 0;
|
||||
if (self.showAllMapsButtons)
|
||||
self.showAllMapsButtons = YES;
|
||||
if (updateInfo.m_numberOfMwmFilesToUpdate != 0)
|
||||
{
|
||||
self.allMapsButton.hidden = NO;
|
||||
[self.allMapsButton
|
||||
|
@ -243,6 +243,22 @@ using namespace storage;
|
|||
forState:UIControlStateNormal];
|
||||
self.allMapsCancelButton.hidden = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
TCountriesVec queuedChildren;
|
||||
s.GetQueuedChildren(parentCountryId, queuedChildren);
|
||||
if (queuedChildren.empty())
|
||||
{
|
||||
self.showAllMapsButtons = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.showAllMapsButtons = YES;
|
||||
self.allMapsButton.hidden = YES;
|
||||
self.allMapsCancelButton.hidden = NO;
|
||||
[self.allMapsCancelButton setTitle:kCancelAllTitle forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (parentCountryId != s.GetRootId())
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue