File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1616- fixed: ramps: Various Infinite UI/UX issues
1717- fixed: Search keyboard not dismissing when submitting search
1818- fixed: Auto-correct not disabled for search input
19+ - fixed: Inaccurate camera permissions detection
1920
2021## 4.41.1 (2025-12-29)
2122
Original file line number Diff line number Diff line change @@ -75,7 +75,10 @@ export const ScanModal: React.FC<Props> = props => {
7575 handleBarCodeRead ( codes )
7676 }
7777 } )
78- const cameraPermission = useSelector ( state => state . permissions . camera )
78+ const reduxCameraPermission = useSelector ( state => state . permissions . camera )
79+ const [ cameraPermission , setCameraPermission ] = React . useState (
80+ reduxCameraPermission
81+ )
7982 const [ torchEnabled , setTorchEnabled ] = React . useState ( false )
8083 const [ scanEnabled , setScanEnabled ] = React . useState ( false )
8184
@@ -87,9 +90,13 @@ export const ScanModal: React.FC<Props> = props => {
8790 // Mount effects
8891 React . useEffect ( ( ) => {
8992 setScanEnabled ( true )
90- checkAndRequestPermission ( 'camera' ) . catch ( ( error : unknown ) => {
91- showError ( error )
92- } )
93+ checkAndRequestPermission ( 'camera' )
94+ . then ( status => {
95+ setCameraPermission ( status )
96+ } )
97+ . catch ( ( error : unknown ) => {
98+ showError ( error )
99+ } )
93100 return ( ) => {
94101 setScanEnabled ( false )
95102 }
You can’t perform that action at this time.
0 commit comments