mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-12 17:30:34 +00:00
Fix case where we forget to unlock in ASNetworkImagenode (#17)
This commit is contained in:
parent
9f6ec95b53
commit
fdb54a02d9
@ -403,7 +403,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
|
|
||||||
- (void)handleProgressImage:(UIImage *)progressImage progress:(CGFloat)progress downloadIdentifier:(nullable id)downloadIdentifier
|
- (void)handleProgressImage:(UIImage *)progressImage progress:(CGFloat)progress downloadIdentifier:(nullable id)downloadIdentifier
|
||||||
{
|
{
|
||||||
__instanceLock__.lock();
|
ASDN::MutexLocker l(__instanceLock__);
|
||||||
|
|
||||||
// Getting a result back for a different download identifier, download must not have been successfully canceled
|
// Getting a result back for a different download identifier, download must not have been successfully canceled
|
||||||
if (ASObjectIsEqual(_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) {
|
if (ASObjectIsEqual(_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) {
|
||||||
@ -412,8 +412,6 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
|
|
||||||
[self _locked_setCurrentImageQuality:progress];
|
[self _locked_setCurrentImageQuality:progress];
|
||||||
[self _locked__setImage:progressImage];
|
[self _locked__setImage:progressImage];
|
||||||
|
|
||||||
__instanceLock__.unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_updateProgressImageBlockOnDownloaderIfNeeded
|
- (void)_updateProgressImageBlockOnDownloaderIfNeeded
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user