[new downloader][ios] Fixed build.
This commit is contained in:
parent
68e3d3207c
commit
9763a68b95
3 changed files with 11 additions and 4 deletions
|
@ -29,7 +29,10 @@ using namespace storage;
|
|||
else if ([cell isKindOfClass:[MWMMapDownloaderPlaceTableViewCell class]])
|
||||
{
|
||||
MWMMapDownloaderPlaceTableViewCell * tCell = (MWMMapDownloaderPlaceTableViewCell *)cell;
|
||||
NSString * areaText = self.isParentRoot ? @(nodeAttrs.m_parentLocalName.c_str()) : @"";
|
||||
BOOL const isSingleParent = (nodeAttrs.m_parentInfo.size() == 1);
|
||||
NSString * areaText = (self.isParentRoot && isSingleParent)
|
||||
? @(nodeAttrs.m_parentInfo[0].m_localName.c_str())
|
||||
: @"";
|
||||
[tCell setAreaText:areaText];
|
||||
if ([cell isKindOfClass:[MWMMapDownloaderSubplaceTableViewCell class]])
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ extern NSString * const kPlaceCellIdentifier;
|
|||
NSString * matchedResult = [self searchMatchedResultForCountryId:countryId];
|
||||
if (![nodeLocalName isEqualToString:matchedResult])
|
||||
return kSubplaceCellIdentifier;
|
||||
if (nodeAttrs.m_parentCountryId == s.GetRootId())
|
||||
if (nodeAttrs.m_parentInfo.size() == 1 && nodeAttrs.m_parentInfo[0].m_id == s.GetRootId())
|
||||
return kCountryCellIdentifier;
|
||||
return kPlaceCellIdentifier;
|
||||
}
|
||||
|
|
|
@ -119,8 +119,12 @@ using namespace storage;
|
|||
BOOL const needsUpdate = (nodeAttrs.m_status == NodeStatus::OnDiskOutOfDate);
|
||||
BOOL const isDownloaded = (needsUpdate || nodeAttrs.m_status == NodeStatus::OnDisk);
|
||||
NSString * title = @(nodeAttrs.m_nodeLocalName.c_str());
|
||||
NSString * message = self.dataSource.isParentRoot ? nil : @(nodeAttrs.m_parentLocalName.c_str());
|
||||
NSString * downloadActionTitle = [NSString stringWithFormat:@"%@, %@", kDownloadActionTitle, formattedSize(nodeAttrs.m_mwmSize)];
|
||||
BOOL const isMultiParent = (nodeAttrs.m_parentInfo.size() > 1);
|
||||
NSString * message = (self.dataSource.isParentRoot || isMultiParent)
|
||||
? nil
|
||||
: @(nodeAttrs.m_parentInfo[0].m_localName.c_str());
|
||||
NSString * downloadActionTitle = [NSString
|
||||
stringWithFormat:@"%@, %@", kDownloadActionTitle, formattedSize(nodeAttrs.m_mwmSize)];
|
||||
if (isIOS7)
|
||||
{
|
||||
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:title
|
||||
|
|
Reference in a new issue