Remove RefreshControl logic platform specific

This commit is contained in:
Diego Mello 2022-11-24 10:29:19 -03:00
parent 898a4a398b
commit 0317c4c27a
2 changed files with 19 additions and 19 deletions

View File

@ -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} />;

View File

@ -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> }) =>