aboutsummaryrefslogtreecommitdiff
path: root/merchant-terminal
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-08-17 17:06:52 -0300
committerTorsten Grote <t@grobox.de>2022-08-17 17:07:53 -0300
commit2fbda24d2205ace0ede93faa824f7836d0ece445 (patch)
tree606ba36c827a8a3bb7f7ccca3a2b3f0642839669 /merchant-terminal
parent48b609b653180b1145b2103097837e514e58364d (diff)
downloadtaler-android-2fbda24d2205ace0ede93faa824f7836d0ece445.tar.gz
taler-android-2fbda24d2205ace0ede93faa824f7836d0ece445.tar.bz2
taler-android-2fbda24d2205ace0ede93faa824f7836d0ece445.zip
Upgrade libraries
Diffstat (limited to 'merchant-terminal')
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt8
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderFragment.kt5
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentSuccessFragment.kt3
3 files changed, 9 insertions, 7 deletions
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 b5b7be7..5564447 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
@@ -22,7 +22,6 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
-import androidx.lifecycle.Observer
import com.google.android.material.snackbar.BaseTransientBottomBar.LENGTH_SHORT
import com.google.android.material.snackbar.Snackbar
import net.taler.common.navigate
@@ -46,18 +45,19 @@ class ConfigFetcherFragment : Fragment() {
return ui.root
}
+ @Deprecated("Deprecated in Java")
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
configManager.fetchConfig(configManager.config, false)
- configManager.configUpdateResult.observe(viewLifecycleOwner, Observer { result ->
+ configManager.configUpdateResult.observe(viewLifecycleOwner) { result ->
when (result) {
- null -> return@Observer
+ null -> return@observe
is ConfigUpdateResult.Error -> onNetworkError(result.msg)
is ConfigUpdateResult.Success -> {
navigate(actionConfigFetcherToOrder())
}
}
- })
+ }
}
private fun onNetworkError(msg: String) {
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderFragment.kt
index 25a1874..0de5939 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/order/OrderFragment.kt
@@ -50,9 +50,10 @@ class OrderFragment : Fragment() {
return ui.root
}
+ @Deprecated("Deprecated in Java")
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
- orderManager.currentOrderId.observe(viewLifecycleOwner, { orderId ->
+ orderManager.currentOrderId.observe(viewLifecycleOwner) { orderId ->
val liveOrder = orderManager.getOrder(orderId)
onOrderSwitched(orderId, liveOrder)
// add a new OrderStateFragment for each order
@@ -60,7 +61,7 @@ class OrderFragment : Fragment() {
childFragmentManager.beginTransaction()
.replace(R.id.fragment1, OrderStateFragment())
.commit()
- })
+ }
}
override fun onStart() {
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentSuccessFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentSuccessFragment.kt
index 5b95dea..c2635c7 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentSuccessFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentSuccessFragment.kt
@@ -31,11 +31,12 @@ class PaymentSuccessFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
- ): View? {
+ ): View {
ui = FragmentPaymentSuccessBinding.inflate(inflater, container, false)
return ui.root
}
+ @Deprecated("Deprecated in Java")
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
ui.paymentButton.setOnClickListener {