diff options
Diffstat (limited to 'merchant-terminal/src/main')
-rw-r--r-- | merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt | 6 | ||||
-rw-r--r-- | merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt index 578debf..137dd37 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt @@ -18,15 +18,13 @@ package net.taler.merchantpos import android.view.View import androidx.annotation.StringRes +import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.snackbar.BaseTransientBottomBar.ANIMATION_MODE_FADE import com.google.android.material.snackbar.BaseTransientBottomBar.Duration import com.google.android.material.snackbar.Snackbar.make fun topSnackbar(view: View, text: CharSequence, @Duration duration: Int) { - make(view, text, duration) - .setAnimationMode(ANIMATION_MODE_FADE) - .setAnchorView(R.id.navHostFragment) - .show() + make(view, text, duration).show() } fun topSnackbar(view: View, @StringRes resId: Int, @Duration duration: Int) { diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt index af340f1..b017726 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt @@ -117,7 +117,9 @@ class PaymentManager( } } } - mPayment.value = mPayment.value!!.copy(error = error) + mPayment.value?.copy(error = error)?.let { + mPayment.value = it + } checkTimer.cancel() checkJob?.isCancelled checkJob = null |