aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/history/HistoryFragment.kt3
-rw-r--r--merchant-terminal/src/main/res/values/strings.xml1
2 files changed, 3 insertions, 1 deletions
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>