Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)

To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
This commit is contained in:
Konstantin Pastbin
2025-04-13 16:37:30 +07:00
commit e3e4a1985a
12931 changed files with 13195100 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
#import "MWMMapDownloaderPlaceTableViewCell.h"
#import <CoreApi/MWMMapNodeAttributes.h>
@interface MWMMapDownloaderPlaceTableViewCell ()
@property(weak, nonatomic) IBOutlet UILabel *descriptionLabel;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint *titleBottomOffset;
@end
@implementation MWMMapDownloaderPlaceTableViewCell
#pragma mark - Config
- (void)config:(MWMMapNodeAttributes *)nodeAttrs searchQuery:(NSString *)searchQuery {
[super config:nodeAttrs searchQuery:searchQuery];
BOOL isDescriptionVisible = NO;
NSDictionary *selectedAreaAttrs = @{NSFontAttributeName : [UIFont bold12]};
NSDictionary *unselectedAreaAttrs = @{NSFontAttributeName : [UIFont regular12]};
self.needDisplayArea = !nodeAttrs.hasParent;
if (self.needDisplayArea && nodeAttrs.topmostParentInfo.count == 1) {
isDescriptionVisible = nodeAttrs.hasParent;
if (isDescriptionVisible) {
self.descriptionLabel.attributedText = [self matchedString:nodeAttrs.topmostParentInfo[0].countryName
selectedAttrs:selectedAreaAttrs
unselectedAttrs:unselectedAreaAttrs];
}
}
else if (nodeAttrs.nodeDescription.length > 0)
{
isDescriptionVisible = YES;
self.descriptionLabel.attributedText = [self matchedString:nodeAttrs.nodeDescription
selectedAttrs:selectedAreaAttrs
unselectedAttrs:unselectedAreaAttrs];
}
self.descriptionLabel.hidden = !isDescriptionVisible;
self.titleBottomOffset.priority =
isDescriptionVisible ? UILayoutPriorityDefaultLow : UILayoutPriorityDefaultHigh;
}
@end