aboutsummaryrefslogtreecommitdiff
path: root/cashier/src
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2023-01-03 11:28:08 -0300
committerTorsten Grote <t@grobox.de>2023-01-03 11:28:08 -0300
commitf94169acb441b5993a82f080c5830d566793a752 (patch)
treefa60277cb606f75c8f6f4848a506e17790a9ecc6 /cashier/src
parent9bb3505277b8132c3fd0be52d9bbbc6078723ff2 (diff)
downloadtaler-android-f94169acb441b5993a82f080c5830d566793a752.tar.gz
taler-android-f94169acb441b5993a82f080c5830d566793a752.tar.bz2
taler-android-f94169acb441b5993a82f080c5830d566793a752.zip
[cashier] Fix some lint warnings
Diffstat (limited to 'cashier/src')
-rw-r--r--cashier/src/main/java/net/taler/cashier/BalanceFragment.kt14
-rw-r--r--cashier/src/main/java/net/taler/cashier/MainActivity.kt1
-rw-r--r--cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt2
3 files changed, 9 insertions, 8 deletions
diff --git a/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt b/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
index b246e9f..4fd3143 100644
--- a/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
+++ b/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
@@ -54,19 +54,19 @@ class BalanceFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?,
- ): View? {
+ ): View {
setHasOptionsMenu(true)
ui = FragmentBalanceBinding.inflate(layoutInflater, container, false)
return ui.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- withdrawManager.lastTransaction.observe(viewLifecycleOwner, { lastTransaction ->
+ withdrawManager.lastTransaction.observe(viewLifecycleOwner) { lastTransaction ->
onLastTransaction(lastTransaction)
- })
- viewModel.balance.observe(viewLifecycleOwner, { result ->
+ }
+ viewModel.balance.observe(viewLifecycleOwner) { result ->
onBalanceUpdated(result)
- })
+ }
ui.button5.setOnClickListener { onAmountButtonPressed(5) }
ui.button10.setOnClickListener { onAmountButtonPressed(10) }
ui.button20.setOnClickListener { onAmountButtonPressed(20) }
@@ -81,9 +81,9 @@ class BalanceFragment : Fragment() {
true
} else false
}
- configManager.currency.observe(viewLifecycleOwner, { currency ->
+ configManager.currency.observe(viewLifecycleOwner) { currency ->
ui.currencyView.text = currency
- })
+ }
ui.confirmWithdrawalButton.setOnClickListener { onAmountConfirmed(getAmountFromView()) }
}
diff --git a/cashier/src/main/java/net/taler/cashier/MainActivity.kt b/cashier/src/main/java/net/taler/cashier/MainActivity.kt
index 2f4c4ec..aacc225 100644
--- a/cashier/src/main/java/net/taler/cashier/MainActivity.kt
+++ b/cashier/src/main/java/net/taler/cashier/MainActivity.kt
@@ -52,6 +52,7 @@ class MainActivity : AppCompatActivity() {
}
}
+ @Deprecated("Deprecated in Java")
override fun onBackPressed() {
if (!configManager.hasConfig() && nav.currentDestination?.id == R.id.configFragment) {
// we are in the configuration screen and need a config to continue
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 07b7415..c951bb8 100644
--- a/cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt
+++ b/cashier/src/main/java/net/taler/cashier/withdraw/ErrorFragment.kt
@@ -37,7 +37,7 @@ class ErrorFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?,
- ): View? {
+ ): View {
ui = FragmentErrorBinding.inflate(inflater, container, false)
return ui.root
}