@@ -20,10 +20,6 @@ - (id) init {
20
20
return self;
21
21
}
22
22
23
- - (void )dealloc {
24
- [NSNotificationCenter .defaultCenter removeObserver: self ];
25
- }
26
-
27
23
- (void )setResizeMode : (RCTResizeMode)resizeMode {
28
24
if (_resizeMode != resizeMode) {
29
25
_resizeMode = resizeMode;
@@ -73,20 +69,10 @@ - (void)sendOnLoad:(UIImage *)image {
73
69
}
74
70
}
75
71
76
- - (void )imageDidLoadObserver : (NSNotification *)notification {
77
- FFFastImageSource *source = notification.object ;
78
- if (source != nil && source.url != nil ) {
79
- [self sd_setImageWithURL: source.url];
80
- }
81
- }
82
-
83
72
- (void )setSource : (FFFastImageSource *)source {
84
73
if (_source != source) {
85
74
_source = source;
86
75
87
- // Attach a observer to refresh other FFFastImageView instance sharing the same source
88
- [NSNotificationCenter .defaultCenter addObserver: self selector: @selector (imageDidLoadObserver: ) name: source.url.absoluteString object: nil ];
89
-
90
76
// Load base64 images.
91
77
NSString * url = [_source.url absoluteString ];
92
78
if (url && [url hasPrefix: @" data:image" ]) {
@@ -183,10 +169,6 @@ - (void)downloadImage:(FFFastImageSource *) source options:(SDWebImageOptions) o
183
169
} else {
184
170
weakSelf.hasCompleted = YES ;
185
171
[weakSelf sendOnLoad: image];
186
-
187
- // Alert other FFFastImageView component sharing the same URL
188
- [NSNotificationCenter .defaultCenter postNotificationName: source.url.absoluteString object: source];
189
-
190
172
if (weakSelf.onFastImageLoadEnd ) {
191
173
weakSelf.onFastImageLoadEnd (@{});
192
174
}
0 commit comments