diff options
author | Torsten Grote <t@grobox.de> | 2020-04-30 14:57:41 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-04-30 14:57:41 -0300 |
commit | d118436966331f23acb872d9c13e1ab6403072c0 (patch) | |
tree | 3d8202563424466eb5eca72a6d5b8ccc3369c3a3 /merchant-terminal/src | |
parent | 056be53a8d51fb6e45167f5d1ec317513b87a906 (diff) | |
download | taler-android-d118436966331f23acb872d9c13e1ab6403072c0.tar.gz taler-android-d118436966331f23acb872d9c13e1ab6403072c0.tar.bz2 taler-android-d118436966331f23acb872d9c13e1ab6403072c0.zip |
Fix lint warnings that appeared after android gradle plugin update
Diffstat (limited to 'merchant-terminal/src')
7 files changed, 11 insertions, 11 deletions
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt index 64f6ceb..533c540 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt @@ -48,7 +48,7 @@ class MainActivity : AppCompatActivity(), OnNavigationItemSelectedListener { private var reallyExit = false companion object { - val TAG = "taler-pos" + const val TAG = "taler-pos" } override fun onCreate(savedInstanceState: Bundle?) { diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt index 7f322fd..8231052 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt @@ -58,7 +58,7 @@ class ConfigFetcherFragment : Fragment() { } private fun onNetworkError(msg: String) { - Snackbar.make(view!!, msg, LENGTH_SHORT).show() + Snackbar.make(requireView(), msg, LENGTH_SHORT).show() navigate(actionConfigFetcherToMerchantSettings()) } diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt index a584af8..77a87fb 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt @@ -147,13 +147,13 @@ class MerchantConfigFragment : Fragment() { private fun onConfigReceived(currency: String) { onResultReceived() updateView() - topSnackbar(view!!, getString(R.string.config_changed, currency), LENGTH_LONG) + topSnackbar(requireView(), getString(R.string.config_changed, currency), LENGTH_LONG) navigate(actionSettingsToOrder()) } private fun onError(msg: String) { onResultReceived() - Snackbar.make(view!!, msg, LENGTH_LONG).show() + Snackbar.make(requireView(), msg, LENGTH_LONG).show() } private fun onResultReceived() { diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt index 589a549..6da3dd2 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt @@ -103,7 +103,7 @@ class MerchantHistoryFragment : Fragment(), RefundClickListener { } private fun onError() { - Snackbar.make(view!!, R.string.error_network, LENGTH_SHORT).show() + Snackbar.make(requireView(), R.string.error_network, LENGTH_SHORT).show() } override fun onRefundClicked(item: HistoryItem) { diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt index 2b85add..eb3d46d 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt @@ -100,7 +100,7 @@ class RefundFragment : Fragment() { } private fun onError(@StringRes res: Int) { - Snackbar.make(view!!, res, LENGTH_LONG).show() + Snackbar.make(requireView(), res, LENGTH_LONG).show() progressBar.fadeOut() refundButton.fadeIn() } diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt index 9c9457c..e947ae2 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt @@ -62,7 +62,7 @@ class ProcessPaymentFragment : Fragment() { private fun onPaymentStateChanged(payment: Payment) { if (payment.error) { - topSnackbar(view!!, R.string.error_network, LENGTH_LONG) + topSnackbar(requireView(), R.string.error_network, LENGTH_LONG) findNavController().navigateUp() return } @@ -88,7 +88,7 @@ class ProcessPaymentFragment : Fragment() { private fun onPaymentCancel() { paymentManager.cancelPayment() findNavController().navigateUp() - topSnackbar(view!!, R.string.payment_canceled, LENGTH_LONG) + topSnackbar(requireView(), R.string.payment_canceled, LENGTH_LONG) } } diff --git a/merchant-terminal/src/main/res/values/strings.xml b/merchant-terminal/src/main/res/values/strings.xml index 1c76a51..eabe816 100644 --- a/merchant-terminal/src/main/res/values/strings.xml +++ b/merchant-terminal/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ <resources> - <string name="app_name">Taler Merchant PoS Terminal</string> + <string name="app_name">GNU Taler Point-of-Sale</string> <string name="app_name_short">Merchant Terminal</string> <string name="project_name">GNU Taler</string> @@ -59,8 +59,8 @@ <string name="refund_error_backend">Error processing refund</string> <string name="refund_error_deadline">Refund deadline has passed</string> <string name="refund_error_already_refunded">Already refunded</string> - <string name="refund_intro_nfc">Please let customer scan QR Code or use NFC to give refund</string> - <string name="refund_intro">Please let customer scan QR Code to give refund</string> + <string name="refund_intro_nfc">Please let customer scan QR Code or use NFC to offer refund</string> + <string name="refund_intro">Please let customer scan QR Code to offer refund</string> <string name="refund_order_ref">Purchase reference: %1$s\n\n%2$s</string> <string name="error_network">Network error</string> |