fix refresh control color in ViewSelector.tsx

zio/stable
Ansh Nanda 2023-05-19 18:27:13 -07:00
parent 91ae0d7775
commit 48a9e1b1dd
1 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import React, {useEffect, useState} from 'react'
import {Pressable, StyleSheet, View} from 'react-native'
import {Pressable, RefreshControl, StyleSheet, View} from 'react-native'
import {FlatList} from './Views'
import {OnScrollCb} from 'lib/hooks/useOnMainScroll'
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
@ -41,6 +41,7 @@ export function ViewSelector({
onRefresh?: () => void
onEndReached?: (info: {distanceFromEnd: number}) => void
}) {
const pal = usePalette('default')
const [selectedIndex, setSelectedIndex] = useState<number>(0)
// events
@ -97,6 +98,13 @@ export function ViewSelector({
onScroll={onScroll}
onRefresh={onRefresh}
onEndReached={onEndReached}
refreshControl={
<RefreshControl
refreshing={refreshing!}
onRefresh={onRefresh}
tintColor={pal.colors.text}
/>
}
onEndReachedThreshold={0.6}
contentContainerStyle={s.contentContainer}
removeClippedSubviews={true}