aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/modals/qr-scanner/qr-scanner.component.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/app/components/modals/qr-scanner/qr-scanner.component.js b/ui/app/components/modals/qr-scanner/qr-scanner.component.js
index d8091ecee..e6ba146d6 100644
--- a/ui/app/components/modals/qr-scanner/qr-scanner.component.js
+++ b/ui/app/components/modals/qr-scanner/qr-scanner.component.js
@@ -35,7 +35,7 @@ export default class QrScanner extends Component {
}
this.codeReader = null
this.permissionChecker = null
- this.notAllowed = false
+ this.needsToReinit = false
}
componentDidMount () {
@@ -52,6 +52,10 @@ export default class QrScanner extends Component {
ready: true,
msg: this.context.t('scanInstructions'),
})
+ if (this.needsToReinit) {
+ this.initCamera()
+ this.needsToReinit = false
+ }
}, 2000)
} else {
// Keep checking for permissions
@@ -88,6 +92,7 @@ export default class QrScanner extends Component {
if (err && err.name === 'NotAllowedError') {
this.setState({msg: this.context.t('youNeedToAllowCameraAccess')})
clearTimeout(this.permissionChecker)
+ this.needsToReinit = true
this.checkPermisisions()
}
})