Skip to content

Commit 82411a9

Browse files
authored
Merge pull request #4 from snabble/feature/minor_improvments
Minor improvements
2 parents 048c1b8 + 5ebf5d0 commit 82411a9

File tree

13 files changed

+509
-557
lines changed

13 files changed

+509
-557
lines changed

CHANGELOG.md

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

4+
## [0.35.3]
5+
6+
### Changes
7+
- Migration ProductResolver to kotlin and make it possible to use it without a chooser
8+
- The show() method was deprecated and replaced by resolve() since it is possible now to use the
9+
resolver without visible interaction
10+
- Empty product image urls will be converted to null
11+
- The priceHeight property of the CheckoutBar contains now its margin
12+
413
## [0.35.2]
514

615
### Added

build.gradle

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

3232
project.ext {
33-
sdkVersion='0.35.2'
33+
sdkVersion='0.35.3'
3434
versionCode=1
3535

3636
compileSdkVersion=30

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ public Builder setCustomerCardPrice(int customerCardPrice) {
497497
}
498498

499499
public Builder setImageUrl(String imageUrl) {
500-
product.imageUrl = imageUrl;
500+
product.imageUrl = imageUrl == null || imageUrl.trim().length() == 0 ? null : imageUrl;
501501
return this;
502502
}
503503

sample/src/main/java/io/snabble/testapp/BaseActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public boolean dispatchKeyEvent(KeyEvent event) {
7878
new ProductResolver.Builder(this)
7979
.setCodes(ScannedCode.parse(SnabbleUI.getProject(), code))
8080
.create()
81-
.show();
81+
.resolve();
8282

8383
return true;
8484
}

ui/src/main/java/io/snabble/sdk/ui/cart/CheckoutBar.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import android.view.LayoutInflater
1010
import android.view.View
1111
import android.widget.*
1212
import androidx.appcompat.app.AlertDialog
13+
import androidx.core.view.marginTop
1314
import androidx.fragment.app.FragmentActivity
1415
import androidx.lifecycle.Lifecycle
1516
import androidx.lifecycle.LifecycleObserver
@@ -46,8 +47,7 @@ class CheckoutBar @JvmOverloads constructor(
4647
}
4748

4849
val priceHeight: Int
49-
get() = priceSum.height
50-
50+
get() = priceSum.height + priceSum.marginTop * 2
5151
init {
5252
LayoutInflater.from(context).inflate(R.layout.snabble_view_checkout_bar, this, true)
5353
orientation = VERTICAL

0 commit comments

Comments
 (0)