mirror of
https://github.com/openfoodfacts/smooth-app.git
synced 2025-08-26 03:01:45 +08:00
add await for _daoProductList.put
This commit is contained in:
@ -173,7 +173,7 @@ class ContinuousScanModel with ChangeNotifier {
|
||||
final ScannedProductState state,
|
||||
) async {
|
||||
_productList.refresh(product);
|
||||
_daoProductList.put(_productList);
|
||||
await _daoProductList.put(_productList);
|
||||
setBarcodeState(product.barcode, state);
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ class ContinuousScanModel with ChangeNotifier {
|
||||
final ScannedProductState state,
|
||||
) async {
|
||||
_productList.add(product);
|
||||
_daoProductList.put(_productList);
|
||||
await _daoProductList.put(_productList);
|
||||
setBarcodeState(product.barcode, state);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user