From ce5a1d2476b1a344b881dd92840934925aedd394 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 3 Sep 2020 13:38:59 -0300 Subject: [wallet] show different withdrawal error message when app is offline --- wallet/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wallet/src/main/java') diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt index 8b4ca9d..14389c4 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt @@ -25,6 +25,7 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.navigation.fragment.findNavController +import net.taler.common.isOnline import net.taler.wallet.MainViewModel import net.taler.wallet.R import net.taler.wallet.databinding.FragmentErrorBinding @@ -48,7 +49,11 @@ class ErrorFragment : Fragment() { super.onViewCreated(view, savedInstanceState) ui.errorTitle.setText(R.string.withdraw_error_title) - ui.errorMessage.setText(R.string.withdraw_error_message) + if (requireContext().isOnline()) { + ui.errorMessage.setText(R.string.withdraw_error_message) + } else { + ui.errorMessage.setText(R.string.offline) + } // show dev error message if dev mode is on val status = withdrawManager.withdrawStatus.value -- cgit v1.2.3