@devries-cameron20 / t3code Mirror · read-only / commits / 3bc4fdf05b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 16:30 UTC

fix(mobile): recover the QR pairing scanner when camera access is denied (#6487)

JJ committed Aug 15, 2026 at 05:41 UTC 3bc4fdf05b6b748a7b506c81dc125f3504f35278
1 file changed +14 -2
apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
+14 -2
@@ -3,7 +3,7 @@ import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/Stac
3 import { StackActions, useNavigation, type StaticScreenProps } from "@react-navigation/native";
4 import { AsyncResult } from "effect/unstable/reactivity";
5 import { useCallback, useEffect, useRef, useState } from "react";
6 -import { Alert, Platform, ScrollView, View } from "react-native";
6 +import { Alert, Linking, Platform, ScrollView, View } from "react-native";
7 import { useSafeAreaInsets } from "react-native-safe-area-context";
8 import { useThemeColor } from "../../lib/useThemeColor";
9
@@ -95,9 +95,21 @@ export function ConnectionsNewRouteScreen({
95 return;
96 }
97
98 + if (permission.canAskAgain) {
99 + Alert.alert(
100 + "Camera access needed",
101 + "Allow camera access to scan an environment pairing QR code.",
102 + );
103 + return;
104 + }
105 +
106 Alert.alert(
107 "Camera access needed",
100 - "Allow camera access to scan an environment pairing QR code.",
108 + "Camera access was denied for this app. Open Settings to enable it.",
109 + [
110 + { text: "Cancel", style: "cancel" },
111 + { text: "Open Settings", onPress: () => void Linking.openSettings() },
112 + ],
113 );
114 }, [cameraPermission?.granted, requestCameraPermission]);
115