[iOS] show "cancel all" button on maps update screen

This commit is contained in:
Aleksey Belouosv 2018-07-13 16:02:41 +03:00 committed by Vlad Mihaylenko
parent e98624d6e2
commit 8075c74d9a

View file

@ -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())
{