Skip to content

Commit df12ed9

Browse files
committed
Fixed CheckoutOnlineView not updating when coming from an activity resumed state
1 parent f0b7307 commit df12ed9

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
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.45.2]
5+
6+
### Fixed
7+
- CheckoutOnlineView not updating when coming from an activity resumed state
8+
49
## [0.45.1]
510

611
### Changes

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

3737
compileSdkVersion=30

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ public void onStateChanged(Checkout.State state) {
173173
return;
174174
}
175175

176+
FragmentActivity hostActivity = UIUtils.getHostFragmentActivity(getContext());
177+
if (!hostActivity.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) {
178+
return;
179+
}
180+
176181
SnabbleUI.Callback callback = SnabbleUI.getUiCallback();
177182
if (callback == null) {
178183
Logger.e("ui action could not be performed: callback is null");

0 commit comments

Comments
 (0)