Skip to content

Commit c537a51

Browse files
committed
Fix order of execution so that the dialog will be shown
1 parent ed7861c commit c537a51

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

CHANGELOG.md

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

4+
## [0.64.1]
5+
6+
### Fixed
7+
- API documentation build
8+
- ViolationNotification dialog
9+
410
## [0.64.0]
511

612
### Breaking Changes
@@ -76,15 +82,15 @@ in Kotlin.
7682

7783
### Added
7884
- Added state persistence for checkout
79-
- CheckoutActivity restores itself when the checkout is in a state that requires the users attention
85+
- `CheckoutActivity` restores itself when the checkout is in a state that requires the users attention
8086

8187
### Changes
8288
- Migrated Checkout to Kotlin
83-
- Added ViewModel to ProductConfirmationDialog
89+
- Added ViewModel to `ProductConfirmationDialog`
8490

8591
### Fixed
86-
- CheckoutOfflineView, CheckoutPOSView, CheckoutCustomerCardView and PaymentStatusView not
87-
updating it's Project correctly, when the CheckoutActivity gets recreated due to state restoration
92+
- `CheckoutOfflineView`, `CheckoutPOSView`, `CheckoutCustomerCardView` and `PaymentStatusView` not
93+
updating it's `Project` correctly, when the `CheckoutActivity` gets recreated due to state restoration
8894

8995
## [0.62.4]
9096

ui/src/main/java/io/snabble/sdk/ui/checkout/Violation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ fun List<ViolationNotification>.getMessage(context: Context) = joinToString("\n"
2626
*/
2727
fun List<ViolationNotification>.showNotificationOnce(context: Context, cart: ShoppingCart) {
2828
val message: String = getMessage(context)
29-
cart.removeViolationNotification(this)
30-
if (cart.violationNotifications.isNotEmpty()){
29+
if (cart.violationNotifications.isNotEmpty()) {
3130
AlertDialog.Builder(context)
3231
.setTitle(R.string.Snabble_Violations_title)
3332
.setMessage(message)
3433
.setPositiveButton(R.string.Snabble_OK, null)
3534
.show()
3635
}
36+
cart.removeViolationNotification(this)
3737
}

0 commit comments

Comments
 (0)