improve product search and barcode scanning
Android Release Build / build-android (push) Failing after 7m42s
Android Release Build / build-android (push) Failing after 7m42s
This commit is contained in:
@@ -220,14 +220,14 @@ export default function App() {
|
||||
}
|
||||
}
|
||||
|
||||
async function scanProductByBarcode(barcode) {
|
||||
async function scanProductByBarcode(barcode, { openWhenFound = true } = {}) {
|
||||
const result = await lookupProductByBarcode(
|
||||
barcode,
|
||||
productCache,
|
||||
preferences.offlineModeEnabled
|
||||
);
|
||||
|
||||
if (result.status === 'found') {
|
||||
if (result.status === 'found' && openWhenFound) {
|
||||
openProduct(result.product);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user