Skip to content

Commit 8b2660d

Browse files
Fabtroncmaier
andauthored
Shopping cart update (APPS-779 -> 782) (#183)
Co-authored-by: Christian Maier <[email protected]>
1 parent ad8e557 commit 8b2660d

File tree

115 files changed

+4732
-3779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+4732
-3779
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
87

98
jobs:
109
build:

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,41 @@ All notable changes to this project will be documented in this file.
33

44
## UNRELEASED
55
### Added
6-
* core: add new and update existing user agent headers
76
### Changed
87
### Removed
98
### Fixed
109

10+
## [0.74.0]
11+
### Added
12+
* core: add new and update existing user agent headers
13+
* core: add new methods to check if a coupon is applied and to remove it
14+
* ui: add button to deactivate coupons on the coupons details page
15+
### Changed
16+
* core:
17+
* migrate the `ShoppingCart` and its logic to kotlin
18+
* everything related to the shopping cart has been moved into the package io.snabble.sdk.shoppingcart like:
19+
* io.snabble.sdk.ShoppingCart -> io.snabble.sdk.shoppingcart.ShoppingCart
20+
* io.snabble.sdk.ShoppingCart.ShoppingCartListener -> io.snabble.sdk.shoppingcart.data.listener.ShoppingCartListener
21+
* io.snabble.sdk.ShoppingCart.SimpleShoppingCartListener -> io.snabble.sdk.shoppingcart.data.listener.SimpleShoppingCartListener
22+
* ui:
23+
* the ShoppingCartFragment and view is deprecated and will be removed in the future. It has been moved to a new package:
24+
* io.snabble.sdk.ui.cart.ShoppingCartFragment -> io.snabble.sdk.ui.cart.deprecated.ShoppingCartFragment
25+
* migrate `ShoppingCartAdapter` to compose. To integrate the new implementation follow these steps:
26+
* If you're not already using compose, add the the required dependencies for the [ComposeView](https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ComposeView)
27+
(don't forget to enable the compose feature and to set the compose compiler options)
28+
* Replace the recycler view with the compose view and use the new `ShoppingCartScreen` instead as it's content.
29+
```kotlin
30+
composeContainer = findViewById(R.id.cart_items_compose)
31+
32+
composeContainer.setContent {
33+
ShoppingCartScreen(
34+
onItemDeleted = { item: ShoppingCart.Item, index: Int ->
35+
// Do something with the deleted item
36+
}
37+
)
38+
}
39+
```
40+
1141
## [0.73.0]
1242
### Added
1343
* ui/ui-toolkit: i18n using the Lokalise

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import io.snabble.sdk.codes.ScannedCode;
2929
import io.snabble.sdk.codes.templates.CodeTemplate;
30+
import io.snabble.sdk.shoppingcart.ShoppingCart;
3031
import io.snabble.sdk.utils.Dispatch;
3132
import io.snabble.sdk.utils.Downloader;
3233
import io.snabble.sdk.utils.Logger;

core/src/main/java/io/snabble/sdk/Project.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import io.snabble.sdk.coupons.Coupons
1313
import io.snabble.sdk.encodedcodes.EncodedCodesOptions
1414
import io.snabble.sdk.events.Events
1515
import io.snabble.sdk.googlepay.GooglePayHelper
16+
import io.snabble.sdk.shoppingcart.ShoppingCart
17+
import io.snabble.sdk.shoppingcart.ShoppingCartStorage
1618
import io.snabble.sdk.utils.GsonHolder
1719
import io.snabble.sdk.utils.Logger
1820
import io.snabble.sdk.utils.SimpleJsonCallback

0 commit comments

Comments
 (0)