Skip to content

Commit c9287c8

Browse files
committed
[refactor] add size condition for accuracy setting.
1 parent 8855c15 commit c9287c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

camerax-mlkit-pack/src/main/java/com/furkan/camerax_mlkit_pack/CameraxManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class CameraxManager(
185185

186186
fun setReaderFormats(@BarcodeFormat vararg moreFormats: Int) {
187187
val firstBarcodeFormat = moreFormats[0]
188-
if (firstBarcodeFormat == Barcode.FORMAT_QR_CODE) {
188+
if (firstBarcodeFormat == Barcode.FORMAT_QR_CODE && moreFormats.size == 1) {
189189
setReadingAccuracyLevel(1)
190190
}
191191
moreFormats.drop(1)

0 commit comments

Comments
 (0)