Revert "Revert "Retry scanning if not a QR code""
This reverts commit 9429a4f22a
.
This commit is contained in:
parent
6399032312
commit
958ee2d356
@ -83,6 +83,7 @@ class QrCodeLoginInstructionsFragment : VectorBaseFragment<FragmentQrCodeLoginIn
|
|||||||
if (activityResult.resultCode == Activity.RESULT_OK) {
|
if (activityResult.resultCode == Activity.RESULT_OK) {
|
||||||
val scannedQrCode = QrCodeScannerActivity.getResultText(activityResult.data)
|
val scannedQrCode = QrCodeScannerActivity.getResultText(activityResult.data)
|
||||||
val wasQrCode = QrCodeScannerActivity.getResultIsQrCode(activityResult.data)
|
val wasQrCode = QrCodeScannerActivity.getResultIsQrCode(activityResult.data)
|
||||||
|
Timber.d("Scanned QR code: $scannedQrCode $wasQrCode")
|
||||||
|
|
||||||
if (wasQrCode && !scannedQrCode.isNullOrBlank()) {
|
if (wasQrCode && !scannedQrCode.isNullOrBlank()) {
|
||||||
onQrCodeScanned(scannedQrCode)
|
onQrCodeScanned(scannedQrCode)
|
||||||
@ -98,5 +99,6 @@ class QrCodeLoginInstructionsFragment : VectorBaseFragment<FragmentQrCodeLoginIn
|
|||||||
|
|
||||||
private fun onQrCodeScannerFailed() {
|
private fun onQrCodeScannerFailed() {
|
||||||
Timber.d("QrCodeLoginInstructionsFragment.onQrCodeScannerFailed")
|
Timber.d("QrCodeLoginInstructionsFragment.onQrCodeScannerFailed")
|
||||||
|
QrCodeScannerActivity.startForResult(requireActivity(), scanActivityResultLauncher)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user