Short-circuit setContentInset in RCTScrollView

Reviewed By: javache

Differential Revision: D3579609

fbshipit-source-id: c108bbe135a0a9a98045ebc8068a103c892a1d0f
This commit is contained in:
Mehdi Mulani 2016-07-18 11:50:31 -07:00 committed by Facebook Github Bot 6
parent 9d2e6a2f8a
commit 40c06b99a2
1 changed files with 4 additions and 0 deletions

View File

@ -526,6 +526,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
- (void)setContentInset:(UIEdgeInsets)contentInset
{
if (UIEdgeInsetsEqualToEdgeInsets(contentInset, _contentInset)) {
return;
}
CGPoint contentOffset = _scrollView.contentOffset;
_contentInset = contentInset;