gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-android] 03/03: [pos] show snackbar at the bottom instead o


From: gnunet
Subject: [taler-taler-android] 03/03: [pos] show snackbar at the bottom instead of top (should resolve UI issues)
Date: Mon, 07 Sep 2020 16:29:03 +0200

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a commit to branch master
in repository taler-android.

commit d78c2003df1db7af448de1c91449201020109190
Author: Torsten Grote <t@grobox.de>
AuthorDate: Mon Sep 7 11:28:22 2020 -0300

    [pos] show snackbar at the bottom instead of top (should resolve UI issues)
---
 merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt      | 6 ++----
 .../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

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]