Skip to content

Commit 7cdd4c9

Browse files
Alexander JarvisFacebook Github Bot 5
authored andcommitted
Fix image source prop change updating image
Summary: fixes facebook#7795 fixes facebook#8500 Motivation: When having a simple button that changes the Image source when tapped, the image doesn't change (or at least sometimes, intermittently it works). This was found to be an issue where the request was being sent to the native layer correctly but then being subsequently cancelled by the `reactSetFrame: method` ... Closes facebook#9137 Differential Revision: D3702867 Pulled By: javache fbshipit-source-id: c89ce6b841179394b6b23850b3128751ef9e0313
1 parent 656f9f4 commit 7cdd4c9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Libraries/Image/RCTImageView.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,6 @@ - (void)reactSetFrame:(CGRect)frame
358358
_targetSize = idealSize;
359359
[self reloadImage];
360360
}
361-
} else {
362-
// Our existing image is good enough.
363-
[self cancelImageLoad];
364-
_targetSize = imageSize;
365361
}
366362
}
367363
}

0 commit comments

Comments
 (0)