Remove RefreshControl logic platform specific
This commit is contained in:
parent
898a4a398b
commit
0317c4c27a
|
@ -19,18 +19,18 @@ interface IRefreshControl extends RefreshControlProps {
|
||||||
|
|
||||||
const RefreshControl = ({ children, onRefresh, refreshing }: IRefreshControl): React.ReactElement => {
|
const RefreshControl = ({ children, onRefresh, refreshing }: IRefreshControl): React.ReactElement => {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
if (isAndroid) {
|
// if (isAndroid) {
|
||||||
return (
|
// return (
|
||||||
<RNRefreshControl
|
// <RNRefreshControl
|
||||||
onRefresh={onRefresh}
|
// onRefresh={onRefresh}
|
||||||
refreshing={refreshing}
|
// refreshing={refreshing}
|
||||||
tintColor={colors.auxiliaryText}
|
// tintColor={colors.auxiliaryText}
|
||||||
style={[style.container, style.inverted]}
|
// style={[style.container, style.inverted]}
|
||||||
>
|
// >
|
||||||
{children}
|
// {children}
|
||||||
</RNRefreshControl>
|
// </RNRefreshControl>
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
const refreshControl = <RNRefreshControl onRefresh={onRefresh} refreshing={refreshing} tintColor={colors.auxiliaryText} />;
|
const refreshControl = <RNRefreshControl onRefresh={onRefresh} refreshing={refreshing} tintColor={colors.auxiliaryText} />;
|
||||||
|
|
||||||
|
|
|
@ -23,13 +23,13 @@ import RefreshControl from './RefreshControl';
|
||||||
const QUERY_SIZE = 50;
|
const QUERY_SIZE = 50;
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
inverted: {
|
// inverted: {
|
||||||
...Platform.select({
|
// ...Platform.select({
|
||||||
android: {
|
// android: {
|
||||||
scaleY: -1
|
// scaleY: -1
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
const onScroll = ({ y }: { y: Value<number> }) =>
|
const onScroll = ({ y }: { y: Value<number> }) =>
|
||||||
|
|
Loading…
Reference in New Issue