Skip to content

Commit 228bff9

Browse files
committed
show checkout done view after offline checkout
1 parent b7696bc commit 228bff9

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33

44
## [0.14.9]
55

6+
### Changes
7+
- Now showing the 'checkout done' screen when pressing 'done' on encoded codes screen
8+
- Added snap scrolling to encoded codes screen
9+
- Improved layout for medium sized devices on encoded codes screen
10+
611
### Fixed
712
- Fixed a race condition in shopping cart product updates
813

core/src/main/java/io/snabble/sdk/ShoppingCart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void invalidate() {
176176
clear();
177177
}
178178

179-
void updateProducts() {
179+
public void updateProducts() {
180180
ProductDatabase productDatabase = project.getProductDatabase();
181181

182182
if (productDatabase.isUpToDate()) {

ui/src/main/java/io/snabble/sdk/ui/checkout/CheckoutEncodedCodesView.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ public void click() {
7777
if (isAtLastBarcode()) {
7878
Project project = SnabbleUI.getProject();
7979
project.getCheckout().approveOfflineMethod();
80-
81-
SnabbleUICallback uiCallback = SnabbleUI.getUiCallback();
82-
if (uiCallback != null) {
83-
uiCallback.goBack();
84-
}
85-
86-
Telemetry.event(Telemetry.Event.CheckoutFinishByUser);
8780
} else {
8881
scrollTo(getNextBarcodeIndex());
8982
}

ui/src/main/java/io/snabble/sdk/ui/checkout/CheckoutView.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,13 @@ public void onStateChanged(Checkout.State state) {
103103
break;
104104
}
105105

106-
if (!checkout.getSelectedPaymentMethod().isOfflineMethod()) {
107-
if (successView != null) {
108-
displayView(successView);
109-
} else {
110-
displayView(new CheckoutDoneView(getContext()));
111-
}
112-
113-
Telemetry.event(Telemetry.Event.CheckoutSuccessful);
106+
if (successView != null) {
107+
displayView(successView);
108+
} else {
109+
displayView(new CheckoutDoneView(getContext()));
114110
}
111+
112+
Telemetry.event(Telemetry.Event.CheckoutSuccessful);
115113
break;
116114
case PAYMENT_ABORTED:
117115
case DENIED_BY_PAYMENT_PROVIDER:

0 commit comments

Comments
 (0)