@@ -20,10 +20,6 @@ - (id) init {
2020 return self;
2121}
2222
23- - (void )dealloc {
24- [NSNotificationCenter .defaultCenter removeObserver: self ];
25- }
26-
2723- (void )setResizeMode : (RCTResizeMode)resizeMode {
2824 if (_resizeMode != resizeMode) {
2925 _resizeMode = resizeMode;
@@ -73,20 +69,10 @@ - (void)sendOnLoad:(UIImage *)image {
7369 }
7470}
7571
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-
8372- (void )setSource : (FFFastImageSource *)source {
8473 if (_source != source) {
8574 _source = source;
8675
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-
9076 // Load base64 images.
9177 NSString * url = [_source.url absoluteString ];
9278 if (url && [url hasPrefix: @" data:image" ]) {
@@ -183,10 +169,6 @@ - (void)downloadImage:(FFFastImageSource *) source options:(SDWebImageOptions) o
183169 } else {
184170 weakSelf.hasCompleted = YES ;
185171 [weakSelf sendOnLoad: image];
186-
187- // Alert other FFFastImageView component sharing the same URL
188- [NSNotificationCenter .defaultCenter postNotificationName: source.url.absoluteString object: source];
189-
190172 if (weakSelf.onFastImageLoadEnd ) {
191173 weakSelf.onFastImageLoadEnd (@{});
192174 }
0 commit comments