Skip to content

Commit

Permalink
revert: Removes functionality for notifying other images on load.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVann committed Apr 23, 2019
1 parent 70be744 commit ac39951
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions ios/FastImage/FFFastImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ - (id) init {
return self;
}

- (void)dealloc {
[NSNotificationCenter.defaultCenter removeObserver:self];
}

- (void)setResizeMode:(RCTResizeMode)resizeMode {
if (_resizeMode != resizeMode) {
_resizeMode = resizeMode;
Expand Down Expand Up @@ -73,20 +69,10 @@ - (void)sendOnLoad:(UIImage *)image {
}
}

- (void)imageDidLoadObserver:(NSNotification *)notification {
FFFastImageSource *source = notification.object;
if (source != nil && source.url != nil) {
[self sd_setImageWithURL:source.url];
}
}

- (void)setSource:(FFFastImageSource *)source {
if (_source != source) {
_source = source;

// Attach a observer to refresh other FFFastImageView instance sharing the same source
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(imageDidLoadObserver:) name:source.url.absoluteString object:nil];

// Load base64 images.
NSString* url = [_source.url absoluteString];
if (url && [url hasPrefix:@"data:image"]) {
Expand Down

0 comments on commit ac39951

Please sign in to comment.