Skip to content

Commit 8d7a5f2

Browse files
Mitchell Swaynclaude
andcommitted
fix(mobile): only the Open T3 Code button leaves the locked camera view
Volume presses reach onCameraCaptureEvent too, so any hardware press was starting an unlock into the app. Keep the handler, which iOS requires, but ignore its events. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9993427 commit 8d7a5f2

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎apps/mobile/targets/camera-control/T3CameraCapture.swift‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct T3CameraCaptureExtension: LockedCameraCaptureExtension {
1313
}
1414
}
1515

16-
// iOS ends the extension without a live viewfinder, so show one and unlock into the app on a press.
16+
// iOS ends the extension without a live viewfinder, so show one and unlock into the app on a tap.
1717
struct T3CameraCaptureView: View {
1818
let session: LockedCameraCaptureSession
1919
@State private var camera = T3CameraPreviewSession()
@@ -28,11 +28,9 @@ struct T3CameraCaptureView: View {
2828
.buttonStyle(.borderedProminent)
2929
.padding(.bottom, 48)
3030
}
31-
.onCameraCaptureEvent { event in
32-
if event.phase == .ended {
33-
openApp()
34-
}
35-
}
31+
// iOS ends the extension without a hardware button handler, and volume presses
32+
// arrive here too, so consume them rather than treating any press as "open".
33+
.onCameraCaptureEvent { _ in }
3634
.onAppear { camera.start() }
3735
.onDisappear { camera.stop() }
3836
}

‎docs/user/usage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Session, Weekly, or both for each provider. Reopen T3 to refresh expired reading
157157

158158
On an iPhone with Camera Control, open **Settings → Camera → Camera Control** and choose
159159
**T3 Code** to open the app with the button. From the Lock Screen, the button shows a camera view
160-
first; press it again or tap **Open T3 Code** to unlock into the app.
160+
first; tap **Open T3 Code** to unlock into the app.
161161

162162
## Keyboard shortcuts
163163

0 commit comments

Comments
 (0)