Skip to content

Commit 02b13a5

Browse files
committed
Fix initialization error and push update
1 parent 8a6e161 commit 02b13a5

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CHANGELOG.md

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

4+
## [0.47.2]
5+
6+
### Fixed
7+
- Initialization error
8+
49
## [0.47.1]
510

611
### Added

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.47.1'
34+
sdkVersion='0.47.2'
3535
versionCode=1
3636

3737
compileSdkVersion=30

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ class Coupons (
7474
postValue(project.coupons.value)
7575
}
7676
}
77-
update()
7877
}
7978

8079
fun filter(type: CouponType): List<Coupon> =

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ public class Project {
9090
Project(JsonObject jsonObject) throws IllegalArgumentException {
9191
snabble = Snabble.getInstance();
9292

93+
parse(jsonObject);
94+
9395
internalStorageDirectory = new File(snabble.getInternalStorageDirectory(), id + "/");
9496
okHttpClient = Snabble.getInstance().getOkHttpClient()
9597
.newBuilder()
9698
.addInterceptor(new SnabbleAuthorizationInterceptor(this))
9799
.addInterceptor(new AcceptedLanguageInterceptor())
98100
.build();
99101

100-
parse(jsonObject);
101-
102102
boolean generateSearchIndex = snabble.getConfig().generateSearchIndex;
103103

104104
productDatabase = new ProductDatabase(this, id + ".sqlite3", generateSearchIndex);
@@ -113,6 +113,8 @@ public class Project {
113113
break;
114114
}
115115
}
116+
117+
coupons.update();
116118
}
117119

118120
void parse(JsonObject jsonObject) {

0 commit comments

Comments
 (0)