aboutsummaryrefslogtreecommitdiff
path: root/cashier/src
diff options
context:
space:
mode:
Diffstat (limited to 'cashier/src')
-rw-r--r--cashier/src/main/java/net/taler/cashier/BalanceFragment.kt2
-rw-r--r--cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt9
2 files changed, 6 insertions, 5 deletions
diff --git a/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt b/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
index c0e2aca..b246e9f 100644
--- a/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
+++ b/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
@@ -104,11 +104,13 @@ class BalanceFragment : Fragment() {
}
}
+ @Deprecated("Deprecated in Java")
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.balance, menu)
super.onCreateOptionsMenu(menu, inflater)
}
+ @Deprecated("Deprecated in Java")
override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
R.id.action_reconfigure -> {
findNavController().navigate(configManager.configDestination)
diff --git a/cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt b/cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt
index 4f98847..07b7415 100644
--- a/cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt
+++ b/cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.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 androidx.navigation.fragment.findNavController
import net.taler.cashier.MainViewModel
import net.taler.cashier.R
@@ -37,22 +36,22 @@ class ErrorFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
- savedInstanceState: Bundle?
+ savedInstanceState: Bundle?,
): View? {
ui = FragmentErrorBinding.inflate(inflater, container, false)
return ui.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- withdrawManager.withdrawStatus.observe(viewLifecycleOwner, Observer { status ->
- if (status == null) return@Observer
+ withdrawManager.withdrawStatus.observe(viewLifecycleOwner) { status ->
+ if (status == null) return@observe
if (status is WithdrawStatus.Aborted) {
ui.textView.setText(R.string.transaction_aborted)
} else if (status is WithdrawStatus.Error) {
ui.textView.text = status.msg
}
withdrawManager.completeTransaction()
- })
+ }
ui.backButton.setOnClickListener {
findNavController().popBackStack()
}