Fix RefreshControl's dependency on AndroidSwipeRefreshLayout
Reviewed By: mdvacca Differential Revision: D7185836 fbshipit-source-id: 726e6e6792f1f3971c2f7de9bb83ff888815220d
This commit is contained in:
parent
7bf3b20837
commit
a162dc8cc6
|
@ -20,7 +20,11 @@ const createReactClass = require('create-react-class');
|
||||||
const requireNativeComponent = require('requireNativeComponent');
|
const requireNativeComponent = require('requireNativeComponent');
|
||||||
|
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
var RefreshLayoutConsts = require('UIManager').AndroidSwipeRefreshLayout.Constants;
|
const AndroidSwipeRefreshLayout =
|
||||||
|
require('UIManager').AndroidSwipeRefreshLayout;
|
||||||
|
var RefreshLayoutConsts = AndroidSwipeRefreshLayout
|
||||||
|
? AndroidSwipeRefreshLayout.Constants
|
||||||
|
: {SIZE: {}};
|
||||||
} else {
|
} else {
|
||||||
var RefreshLayoutConsts = {SIZE: {}};
|
var RefreshLayoutConsts = {SIZE: {}};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue