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 { colors } = useTheme();
|
||||
if (isAndroid) {
|
||||
return (
|
||||
<RNRefreshControl
|
||||
onRefresh={onRefresh}
|
||||
refreshing={refreshing}
|
||||
tintColor={colors.auxiliaryText}
|
||||
style={[style.container, style.inverted]}
|
||||
>
|
||||
{children}
|
||||
</RNRefreshControl>
|
||||
);
|
||||
}
|
||||
// if (isAndroid) {
|
||||
// return (
|
||||
// <RNRefreshControl
|
||||
// onRefresh={onRefresh}
|
||||
// refreshing={refreshing}
|
||||
// tintColor={colors.auxiliaryText}
|
||||
// style={[style.container, style.inverted]}
|
||||
// >
|
||||
// {children}
|
||||
// </RNRefreshControl>
|
||||
// );
|
||||
// }
|
||||
|
||||
const refreshControl = <RNRefreshControl onRefresh={onRefresh} refreshing={refreshing} tintColor={colors.auxiliaryText} />;
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ import RefreshControl from './RefreshControl';
|
|||
const QUERY_SIZE = 50;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
inverted: {
|
||||
...Platform.select({
|
||||
android: {
|
||||
scaleY: -1
|
||||
}
|
||||
})
|
||||
}
|
||||
// inverted: {
|
||||
// ...Platform.select({
|
||||
// android: {
|
||||
// scaleY: -1
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
});
|
||||
|
||||
const onScroll = ({ y }: { y: Value<number> }) =>
|
||||
|
|
Loading…
Reference in New Issue