mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-07 21:20:07 +00:00
Add more deep compares when setting public properties to the same value
This commit is contained in:
parent
2e5da5599d
commit
87caed27e2
@ -217,7 +217,7 @@
|
||||
|
||||
- (void)setTypingAttributes:(NSDictionary *)typingAttributes
|
||||
{
|
||||
if (_typingAttributes == typingAttributes)
|
||||
if (ASObjectIsEqual(typingAttributes, _typingAttributes))
|
||||
return;
|
||||
|
||||
_typingAttributes = [typingAttributes copy];
|
||||
|
@ -18,6 +18,7 @@
|
||||
#import "ASImageNode+CGExtras.h"
|
||||
|
||||
#import "ASInternalHelpers.h"
|
||||
#import "ASEqualityHelpers.h"
|
||||
|
||||
@interface _ASImageNodeDrawParameters : NSObject
|
||||
|
||||
@ -123,7 +124,7 @@
|
||||
- (void)setImage:(UIImage *)image
|
||||
{
|
||||
ASDN::MutexLocker l(_imageLock);
|
||||
if (_image != image) {
|
||||
if (!ASObjectIsEqual(_image, image)) {
|
||||
_image = image;
|
||||
|
||||
ASDN::MutexUnlocker u(_imageLock);
|
||||
|
@ -11,7 +11,7 @@
|
||||
#import "ASBasicImageDownloader.h"
|
||||
#import "ASDisplayNode+Subclasses.h"
|
||||
#import "ASThread.h"
|
||||
|
||||
#import "ASEqualityHelpers.h"
|
||||
|
||||
@interface ASNetworkImageNode ()
|
||||
{
|
||||
@ -70,7 +70,7 @@
|
||||
{
|
||||
ASDN::MutexLocker l(_lock);
|
||||
|
||||
if (URL == _URL || [URL isEqual:_URL]) {
|
||||
if (ASObjectIsEqual(URL, _URL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
{
|
||||
ASDN::MutexLocker l(_lock);
|
||||
|
||||
if (defaultImage == _defaultImage || [defaultImage isEqual:_defaultImage]) {
|
||||
if (ASObjectIsEqual(defaultImage, _defaultImage)) {
|
||||
return;
|
||||
}
|
||||
_defaultImage = defaultImage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user