mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Simplify ASMapNode.setAnnotations
This commit is contained in:
@@ -260,12 +260,10 @@
|
|||||||
|
|
||||||
- (void)setAnnotations:(NSArray *)annotations
|
- (void)setAnnotations:(NSArray *)annotations
|
||||||
{
|
{
|
||||||
if (annotations == nil) {
|
annotations = [annotations copy] ?: @[];
|
||||||
annotations = @[];
|
|
||||||
}
|
|
||||||
|
|
||||||
ASDN::MutexLocker l(_propertyLock);
|
ASDN::MutexLocker l(_propertyLock);
|
||||||
_annotations = [annotations copy];
|
_annotations = annotations;
|
||||||
if (self.isLiveMap) {
|
if (self.isLiveMap) {
|
||||||
[_mapView removeAnnotations:_mapView.annotations];
|
[_mapView removeAnnotations:_mapView.annotations];
|
||||||
[_mapView addAnnotations:annotations];
|
[_mapView addAnnotations:annotations];
|
||||||
|
|||||||
Reference in New Issue
Block a user