From 48a9e1b1dd98aa6f730c7d3ad88d393508f836e4 Mon Sep 17 00:00:00 2001
From: Ansh Nanda <anshnanda10@gmail.com>
Date: Fri, 19 May 2023 18:27:13 -0700
Subject: fix refresh control color in ViewSelector.tsx

---
 src/view/com/util/ViewSelector.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/view/com/util/ViewSelector.tsx')

diff --git a/src/view/com/util/ViewSelector.tsx b/src/view/com/util/ViewSelector.tsx
index f9ef0945d..c44d372f5 100644
--- a/src/view/com/util/ViewSelector.tsx
+++ b/src/view/com/util/ViewSelector.tsx
@@ -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}
-- 
cgit 1.4.1


From 7cad7d12f1b6d97ae3395a2b3ce6ad0c102aea56 Mon Sep 17 00:00:00 2001
From: Ansh Nanda <anshnanda10@gmail.com>
Date: Fri, 19 May 2023 18:32:21 -0700
Subject: add refreshControl to tab ViewSelector

---
 src/view/com/util/ViewSelector.tsx | 2 --
 1 file changed, 2 deletions(-)

(limited to 'src/view/com/util/ViewSelector.tsx')

diff --git a/src/view/com/util/ViewSelector.tsx b/src/view/com/util/ViewSelector.tsx
index c44d372f5..5b671d06c 100644
--- a/src/view/com/util/ViewSelector.tsx
+++ b/src/view/com/util/ViewSelector.tsx
@@ -94,9 +94,7 @@ export function ViewSelector({
       ListFooterComponent={ListFooterComponent}
       // NOTE sticky header disabled on android due to major performance issues -prf
       stickyHeaderIndices={isAndroid ? undefined : STICKY_HEADER_INDICES}
-      refreshing={refreshing}
       onScroll={onScroll}
-      onRefresh={onRefresh}
       onEndReached={onEndReached}
       refreshControl={
         <RefreshControl
-- 
cgit 1.4.1

