Skip to content

Commit 02df60d

Browse files
committed
Merge branch 'master' into taxation
2 parents 8587e2f + bd8a69b commit 02df60d

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

CHANGELOG.md

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

4+
## [0.42.2]
5+
6+
### Fixed
7+
- Fixed NullPointerException introduced in 0.42.1
8+
9+
## [0.42.1]
10+
11+
### Fixed
12+
- Only update prices when the shop differs, not always when setCheckedInShop is called
13+
414
## [0.42.0]
515

616
### Changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ allprojects {
3131
}
3232

3333
project.ext {
34-
sdkVersion='0.42.0'
34+
sdkVersion='0.42.2'
3535
versionCode=1
3636

3737
compileSdkVersion=30

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,14 @@ public String getText(String key, String defaultValue) {
483483
* payment process.
484484
*/
485485
public void setCheckedInShop(Shop checkedInShop) {
486-
this.checkedInShop = checkedInShop;
487-
events.updateShop(checkedInShop);
488-
getShoppingCart().updatePrices(false);
486+
String currentShopId = this.checkedInShop != null ? this.checkedInShop.getId() : "";
487+
String newShopId = checkedInShop != null ? checkedInShop.getId() : "";
488+
489+
if (!currentShopId.equals(newShopId)) {
490+
this.checkedInShop = checkedInShop;
491+
events.updateShop(checkedInShop);
492+
getShoppingCart().updatePrices(false);
493+
}
489494
}
490495

491496
public Shop getCheckedInShop() {

0 commit comments

Comments
 (0)