Skip to content

Commit

Permalink
Merge pull request #3 from furkanturkn/bugfix/2_barcode_qr_accuracy_bug
Browse files Browse the repository at this point in the history
[refactor] add size condition for accuracy setting.
  • Loading branch information
furkanturkn authored Feb 13, 2023
2 parents 8855c15 + c9287c8 commit 8a0f7c8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class CameraxManager(

fun setReaderFormats(@BarcodeFormat vararg moreFormats: Int) {
val firstBarcodeFormat = moreFormats[0]
if (firstBarcodeFormat == Barcode.FORMAT_QR_CODE) {
if (firstBarcodeFormat == Barcode.FORMAT_QR_CODE && moreFormats.size == 1) {
setReadingAccuracyLevel(1)
}
moreFormats.drop(1)
Expand Down

0 comments on commit 8a0f7c8

Please sign in to comment.