diff options
author | Torsten Grote <t@grobox.de> | 2020-09-03 13:38:59 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-09-03 13:38:59 -0300 |
commit | ce5a1d2476b1a344b881dd92840934925aedd394 (patch) | |
tree | c5dc1ce3ccdea993661c70d3d79abdd1bdf2a001 /wallet | |
parent | 1cb91611af564116e75384f17bc5af97b1ed2d12 (diff) | |
download | taler-android-ce5a1d2476b1a344b881dd92840934925aedd394.tar.gz taler-android-ce5a1d2476b1a344b881dd92840934925aedd394.tar.bz2 taler-android-ce5a1d2476b1a344b881dd92840934925aedd394.zip |
[wallet] show different withdrawal error message when app is offline
Diffstat (limited to 'wallet')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/withdraw/ErrorFragment.kt | 7 | ||||
-rw-r--r-- | wallet/src/main/res/values/strings.xml | 2 |
2 files changed, 8 insertions, 1 deletions
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 diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml index a780ad3..d49f5f7 100644 --- a/wallet/src/main/res/values/strings.xml +++ b/wallet/src/main/res/values/strings.xml @@ -54,6 +54,8 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card <string name="menu">Menu</string> <string name="or">or</string> + <string name="offline">Operation requires internet access. Please ensure your internet connection works and try again.</string> + <string name="menu_settings">Settings</string> <string name="menu_retry_pending_operations">Retry Pending Operations</string> |