aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-08-01 06:58:54 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-08-01 06:58:54 +0800
commit94a89790dcca3003fde59e8385b8c3d32f36d466 (patch)
tree8c4e14e042cafb01a4e1d2b8810b288519decae5 /ui
parent7a40072f1aff5296f80c0aab29ea679384de0b8d (diff)
downloadtangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.tar
tangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.tar.gz
tangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.tar.bz2
tangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.tar.lz
tangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.tar.xz
tangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.tar.zst
tangerine-wallet-browser-94a89790dcca3003fde59e8385b8c3d32f36d466.zip
fix
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()
}
})