Correct what the volume keys do behind a modal

This commit is contained in:
2026-09-16 10:26:38 +07:00
parent e1ce7af76f
commit 78420002d1
+3 -3
View File
@@ -1544,9 +1544,9 @@ export default function App() {
return () => sub.remove();
}, []);
// Only the camera screen claims the keys; everywhere else (the library)
// they stay volume keys.
// ponytail: keyed off the mode alone, so a press behind a modal still
// takes a frame - add the overlay flags here if that ever bites.
// they stay volume keys. The modals need no flag of their own: an RN
// Modal is a window of its own and holds the focus, so the activity never
// sees a key while one is up.
useEffect(() => {
VolumeShutter.setEnabled(mode === 'camera');
}, [mode]);