Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RefreshControl on initial render will not beginRefresh when refreshin…
…g state is false Summary: There's an edge case in the `RefreshControl` which causes it to show as refreshing when the state is set to false. When the component is initialized with `refreshing` set to `true` on initial render but set to `false` before `layoutSubviews` is called, it will call `beginRefresh` and ignore its state. That's because `layoutSubviews` never checks if `_currentRefreshingState` is in fact still `true`, it merely assumes it is. This is fixed by simply doing a check for `_currentRefreshingState` before entering `beginRefresh` from `layoutSubviews`. Closes #7556 Differential Revision: D3300124 fbshipit-source-id: d1dce8612e2c03b1f14284d513803d00af4b5c8a
- Loading branch information