Committed by
GitHub
Merge pull request #594 from AilurusRedPanda/master
fix(onDetect): Fixed bug where onDetect method was being called multiple times.
Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -64,7 +64,7 @@ class MobileScanner( | @@ -64,7 +64,7 @@ class MobileScanner( | ||
| 64 | // New scanned is duplicate, returning | 64 | // New scanned is duplicate, returning |
| 65 | return@addOnSuccessListener | 65 | return@addOnSuccessListener |
| 66 | } | 66 | } |
| 67 | - lastScanned = newScannedBarcodes | 67 | + if (newScannedBarcodes.isNotEmpty()) lastScanned = newScannedBarcodes |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | val barcodeMap: MutableList<Map<String, Any?>> = mutableListOf() | 70 | val barcodeMap: MutableList<Map<String, Any?>> = mutableListOf() |
-
Please register or login to post a comment