[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 01/04: [pos] improve error message when fetching t
From: |
gnunet |
Subject: |
[taler-taler-android] 01/04: [pos] improve error message when fetching the history fails |
Date: |
Wed, 09 Sep 2020 18:54:07 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to annotated tag wallet-v0.8.0-rc.2
in repository taler-android.
commit cab40e31124b3a2438f56bee42e1dd31def6d8f5
Author: Torsten Grote <t@grobox.de>
AuthorDate: Wed Sep 9 08:57:47 2020 -0300
[pos] improve error message when fetching the history fails
---
.../src/main/java/net/taler/merchantpos/history/HistoryFragment.kt | 3 ++-
merchant-terminal/src/main/res/values/strings.xml | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git
a/merchant-terminal/src/main/java/net/taler/merchantpos/history/HistoryFragment.kt
b/merchant-terminal/src/main/java/net/taler/merchantpos/history/HistoryFragment.kt
index c7cd8ba..2993177 100644
---
a/merchant-terminal/src/main/java/net/taler/merchantpos/history/HistoryFragment.kt
+++
b/merchant-terminal/src/main/java/net/taler/merchantpos/history/HistoryFragment.kt
@@ -31,6 +31,7 @@ import net.taler.common.navigate
import net.taler.common.showError
import net.taler.merchantlib.OrderHistoryEntry
import net.taler.merchantpos.MainViewModel
+import net.taler.merchantpos.R
import net.taler.merchantpos.databinding.FragmentMerchantHistoryBinding
import
net.taler.merchantpos.history.HistoryFragmentDirections.Companion.actionGlobalMerchantSettings
import
net.taler.merchantpos.history.HistoryFragmentDirections.Companion.actionNavHistoryToRefundFragment
@@ -80,7 +81,7 @@ class HistoryFragment : Fragment(), RefundClickListener {
})
historyManager.items.observe(viewLifecycleOwner, { result ->
when (result) {
- is HistoryResult.Error ->
requireActivity().showError(result.msg)
+ is HistoryResult.Error ->
requireActivity().showError(R.string.error_history, result.msg)
is HistoryResult.Success ->
historyListAdapter.setData(result.items)
}.exhaustive
})
diff --git a/merchant-terminal/src/main/res/values/strings.xml
b/merchant-terminal/src/main/res/values/strings.xml
index bedc486..bee3cd4 100644
--- a/merchant-terminal/src/main/res/values/strings.xml
+++ b/merchant-terminal/src/main/res/values/strings.xml
@@ -67,6 +67,7 @@
<string name="error_payment">Error: No payment received</string>
<string name="error_timeout">No payment made within payment period, please
try again!</string>
<string name="error_cancelled">Payment cancelled</string>
+ <string name="error_history">Error fetching the order history</string>
<string name="toast_back_to_exit">Click «back» again to exit</string>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.