diff --git a/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx b/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
index b0e25c6dcdb9cb434a6bdf91e414902629741bb7..7987e8ff6d66fd3e504503dab4bc9e3ee6ceb5a0 100644
--- a/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
+++ b/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
@@ -54,15 +54,15 @@ function ConfiguredConnectOnboardingRouteScreen() {
cloudEnvironments: null,
});
- // Pull-to-refresh tracks its own spinner instead of discovery's refreshing
- // flag, so background refreshes (e.g. the sign-in one) don't yank the
- // content down.
- const [isPullRefreshing, setIsPullRefreshing] = useState(false);
- const handlePullRefresh = useCallback(() => {
+ const [isRefreshing, setIsRefreshing] = useState(false);
+ const handleRefresh = useCallback(() => {
void (async () => {
- setIsPullRefreshing(true);
- await refreshRelayEnvironments();
- setIsPullRefreshing(false);
+ setIsRefreshing(true);
+ try {
+ await refreshRelayEnvironments();
+ } finally {
+ setIsRefreshing(false);
+ }
})();
}, [refreshRelayEnvironments]);
@@ -87,7 +87,16 @@ function ConfiguredConnectOnboardingRouteScreen() {
{Platform.OS === "android" ? (
) : (
@@ -95,6 +104,7 @@ function ConfiguredConnectOnboardingRouteScreen() {
)}
+ Platform.OS === "ios" ? (
+
+ ) : undefined
}
>
{isSignedIn ? (
diff --git a/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx b/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
index 81d48a94848c0484d1120f744c14a1a43d90f219..89580939d4c550b51948672e0015ca30818748b2 100644
--- a/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
+++ b/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
@@ -212,6 +212,7 @@ export function ConnectionsNewRouteScreen({
]}
>
) {
const content = (
) {
queuedRuns.map(({ run }) => ({ id: run.id, ...rowLayouts.current.get(run.id) }));
const content = (
{
- setIsPullRefreshing(true);
+ const [isRefreshing, setIsRefreshing] = useState(false);
+ const handleRefresh = useCallback(async () => {
+ setIsRefreshing(true);
try {
await gitActions.refreshSelectedThreadGitStatus();
} finally {
- setIsPullRefreshing(false);
+ setIsRefreshing(false);
}
}, [gitActions]);
const content = (
void handlePullRefresh()} />
+ Platform.OS === "ios" || isInspector ? (
+ void handleRefresh()} />
+ ) : undefined
}
>
{
- if (nativeEvent.event === "refresh") void handlePullRefresh();
+ if (nativeEvent.event === "refresh") void handleRefresh();
}}
>
{(open) => (