Skip to content

Commit 90dd61a

Browse files
authored
Merge pull request #55 from snabble/fix_preweighed_items
fixed a regression when adding pre weighed items to shopping cart
2 parents 70db152 + 4970ce3 commit 90dd61a

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.68.3]
5+
6+
- Fixed a regression when pre-weighed products to the shopping cart
7+
48
## [0.68.2]
59

610
### Fixed
7-
- Fixed regression in shopping cart when using multiple manual coupons
11+
- Fixed a regression in shopping cart when using multiple manual coupons
812

913
## [0.68.1]
1014

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ allprojects {
3333
}
3434

3535
project.ext {
36-
sdkVersion='0.68.2'
36+
sdkVersion='0.68.3'
3737
versionCode=1
3838

3939
compileSdkVersion=31

ui/src/main/java/io/snabble/sdk/ui/scanner/ProductConfirmationDialog.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ interface ProductConfirmationDialog {
105105
} else if (cartItem.product?.type == Product.Type.UserWeighed && quantity.value == 0) {
106106
quantity.cycleFreeValue(null)
107107
}
108+
109+
if (newQuantity > 0 && cartItem.product?.type == Product.Type.PreWeighed) {
110+
quantity.postValue(newQuantity)
111+
quantityCanBeChanged.postValue(false)
112+
quantityVisible.postValue(true)
113+
}
114+
108115
addToCartButtonText.postString(R.string.Snabble_Scanner_addToCart)
109116
quantityContentDescription.postNullableString(
110117
R.string.Snabble_Scanner_Accessibility_eventQuantityUpdate,

0 commit comments

Comments
 (0)