mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Scope like a boss
This commit is contained in:
@@ -276,16 +276,15 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
||||
|
||||
- (void)setImageIdentifiers:(NSArray *)imageIdentifiers
|
||||
{
|
||||
_imageIdentifiersLock.lock();
|
||||
{
|
||||
ASDN::MutexLocker l(_imageIdentifiersLock);
|
||||
if (ASObjectIsEqual(_imageIdentifiers, imageIdentifiers)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ASObjectIsEqual(_imageIdentifiers, imageIdentifiers)) {
|
||||
_imageIdentifiersLock.unlock();
|
||||
return;
|
||||
_imageIdentifiers = [[NSArray alloc] initWithArray:imageIdentifiers copyItems:YES];
|
||||
}
|
||||
|
||||
_imageIdentifiers = [[NSArray alloc] initWithArray:imageIdentifiers copyItems:YES];
|
||||
_imageIdentifiersLock.unlock();
|
||||
|
||||
if (self.interfaceState & ASInterfaceStateFetchData) {
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user