fix(mobile): fix pull to refresh disappearing on iOS

This commit is contained in:
daniel31x13
2025-11-12 14:42:38 -05:00
parent 0ff5092561
commit fa4d9313ff

View File

@@ -22,9 +22,8 @@ export default function DashboardScreen() {
...dashboardData
} = useDashboardData(auth);
const { data: user, ...userData } = useUser(auth);
const { data: collections = [], refetch: refetchCollections } =
useCollections(auth);
const { data: tags = [], refetch: refetchTags } = useTags(auth);
const { data: collections = [], ...collectionsData } = useCollections(auth);
const { data: tags = [], ...tagsData } = useTags(auth);
const { colorScheme } = useColorScheme();
@@ -62,12 +61,17 @@ export default function DashboardScreen() {
<ScrollView
refreshControl={
<Spinner
refreshing={dashboardData.isLoading || userData.isLoading}
refreshing={
dashboardData.isRefetching ||
userData.isRefetching ||
collectionsData.isRefetching ||
tagsData.isRefetching
}
onRefresh={() => {
dashboardData.refetch();
userData.refetch();
refetchCollections();
refetchTags();
collectionsData.refetch();
tagsData.refetch();
}}
progressBackgroundColor={
rawTheme[colorScheme as ThemeName]["base-200"]